Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Can you tell the value of a, b and c?

Can you tell the value of a, b and c?

Scheduled Pinned Locked Moved The Lounge
c++debuggingquestionlearning
18 Posts 11 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Andre xxxxxxx
    wrote on last edited by
    #1

    int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

    Of course without using your favourite C++ debugger ;)

    L E N J J 10 Replies Last reply
    0
    • A Andre xxxxxxx

      int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

      Of course without using your favourite C++ debugger ;)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Wouldn't that be implementation dependent?

      A 1 Reply Last reply
      0
      • A Andre xxxxxxx

        int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

        Of course without using your favourite C++ debugger ;)

        E Offline
        E Offline
        Ennis Ray Lynch Jr
        wrote on last edited by
        #3

        Building an expression tree is a sophomore level task that is not worthy of being performed here :p

        Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

        N B 2 Replies Last reply
        0
        • A Andre xxxxxxx

          int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

          Of course without using your favourite C++ debugger ;)

          N Offline
          N Offline
          NormDroid
          wrote on last edited by
          #4

          I really can't belive you don't know the answer. I suggest you take the homework to your mommy or class tutor.

          Software Kinetics (requires SL3 beta) - Moving software

          1 Reply Last reply
          0
          • E Ennis Ray Lynch Jr

            Building an expression tree is a sophomore level task that is not worthy of being performed here :p

            Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

            N Offline
            N Offline
            NormDroid
            wrote on last edited by
            #5

            Now that is funny :)

            Software Kinetics (requires SL3 beta) - Moving software

            1 Reply Last reply
            0
            • A Andre xxxxxxx

              int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

              Of course without using your favourite C++ debugger ;)

              J Offline
              J Offline
              Jim Crafton
              wrote on last edited by
              #6

              d

              ¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow

              1 Reply Last reply
              0
              • A Andre xxxxxxx

                int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                Of course without using your favourite C++ debugger ;)

                J Offline
                J Offline
                Joe Woodbury
                wrote on last edited by
                #7

                Not at a glance, but I can tell you what the disposition would be of the programmer if he worked for me.

                D 1 Reply Last reply
                0
                • A Andre xxxxxxx

                  int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                  Of course without using your favourite C++ debugger ;)

                  T Offline
                  T Offline
                  Todd Smith
                  wrote on last edited by
                  #8

                  42, 42 and 42

                  Todd Smith

                  1 Reply Last reply
                  0
                  • L Lost User

                    Wouldn't that be implementation dependent?

                    A Offline
                    A Offline
                    Andre xxxxxxx
                    wrote on last edited by
                    #9

                    harold aptroot wrote:

                    Wouldn't that be implementation dependent?

                    I don't see anything where the behaviour is undefined in the C++ specification.

                    L 1 Reply Last reply
                    0
                    • J Joe Woodbury

                      Not at a glance, but I can tell you what the disposition would be of the programmer if he worked for me.

                      D Offline
                      D Offline
                      Dan Neely
                      wrote on last edited by
                      #10

                      Mr Sore Bottom on the Sidewalk with a Pink Slip?

                      The latest nation. Procrastination.

                      B 1 Reply Last reply
                      0
                      • A Andre xxxxxxx

                        int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                        Of course without using your favourite C++ debugger ;)

                        B Offline
                        B Offline
                        Brady Kelly
                        wrote on last edited by
                        #11

                        define(x, y)

                        1 Reply Last reply
                        0
                        • E Ennis Ray Lynch Jr

                          Building an expression tree is a sophomore level task that is not worthy of being performed here :p

                          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

                          B Offline
                          B Offline
                          Brady Kelly
                          wrote on last edited by
                          #12

                          :thumbsup:

                          1 Reply Last reply
                          0
                          • D Dan Neely

                            Mr Sore Bottom on the Sidewalk with a Pink Slip?

                            The latest nation. Procrastination.

                            B Offline
                            B Offline
                            Brady Kelly
                            wrote on last edited by
                            #13

                            dan neely wrote:

                            Mr Sore Bottom

                            GreyFace! :mad:

                            1 Reply Last reply
                            0
                            • A Andre xxxxxxx

                              harold aptroot wrote:

                              Wouldn't that be implementation dependent?

                              I don't see anything where the behaviour is undefined in the C++ specification.

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #14

                              Assignment and use without sequence points?

                              1 Reply Last reply
                              0
                              • A Andre xxxxxxx

                                int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                                Of course without using your favourite C++ debugger ;)

                                L Offline
                                L Offline
                                Lost User
                                wrote on last edited by
                                #15

                                Yes.

                                Visit http://www.notreadytogiveup.com/[^] and do something special today.

                                1 Reply Last reply
                                0
                                • A Andre xxxxxxx

                                  int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                                  Of course without using your favourite C++ debugger ;)

                                  J Offline
                                  J Offline
                                  Jorgen Sigvardsson
                                  wrote on last edited by
                                  #16

                                  Tough crowd, eh? :)

                                  -- Kein Mitleid Für Die Mehrheit

                                  B 1 Reply Last reply
                                  0
                                  • J Jorgen Sigvardsson

                                    Tough crowd, eh? :)

                                    -- Kein Mitleid Für Die Mehrheit

                                    B Offline
                                    B Offline
                                    Brady Kelly
                                    wrote on last edited by
                                    #17

                                    :laugh:

                                    1 Reply Last reply
                                    0
                                    • A Andre xxxxxxx

                                      int a, b, c((3, a) = (0?(a=6):(b=7), (a << b >> a), b = 5));

                                      Of course without using your favourite C++ debugger ;)

                                      A Offline
                                      A Offline
                                      Amarnath S
                                      wrote on last edited by
                                      #18

                                      Stop using your head. Start using your computer. What's it for, anyway?

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups