Home TechnologyProgramming Subscribe to RSS

In C Language:- Int A=4,b=7; Printf("%d%d",b++,--b); What Is The Output ?why?

Answer Question

1 Answer - Sort by: Date | Rating

    It will print:
    7 7

    First %d will show 7 because first the printf function will show the variable b, which is 7, and then add 1 to the variable will make it 7+1 = 8
    Second %d also show 7 because it first subtract 1 from 8 and save it to variable b and then show it on the screen. Which means that the variable b is now equal to 7.
    0 0

    Ellie82 

    answered 11 months ago

      Answer Question - Answers are editable for 5 min.

      If you do not Sign-in or Register your answers will be anonymous,

      your answers may also be checked before going online.

      More

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store

        Blurtit International