Search This Blog

Thursday, October 13, 2011

Illustrate working of increment operator(++)

   1:  #include<stdio.h>
   2:  #include<conio.h>
   3:  void main()
   4:  {
   5:  int a,b,x,y;
   6:  a=b=2;
   7:  x=a++;
   8:  y=++b;
   9:  printf("At this point \n");
  10:  printf("Value of x= %d\n",x);
  11:  printf("Value of y= %d\n",y);
  12:  getch();
  13:  }

No comments:

Post a Comment