Saturday, 27 December 2014

What is the Output of the following Question - Daily Quetions






Program:

#include<stdio.h>
#include<conio.h>
void main( ) 
{
          int i,j;
          j = 10;
          i = j++ - j++;
          printf("%d %d", i,j);

}

Solution:

       j=10
       i= 10 - 10
j value  is incremented by two times.
So,Output is 0, 12



0 comments:

Post a Comment