how work internally increment or decrement operator

0 laxmikant chhipa · August 21, 2015
#include<stdio.h>
void main()
{
int c=5;
printf("%d%d%d%d",c,++c,++c,c++);
}
output come :- 8885
but it may be come as :- 5,6,7,7 or   8875

what is actully happen

Post a Reply

Replies

Oldest  Newest  Rating
0 christina lorence · August 21, 2015
C++ means it prints the value of c. Then only it increments. But ++C means first increments the value. Then prints the c value.
You can use literature review for a  dissertation for more.
  • 1

C

107,222 followers
About

One of the most popular languages of all time.

Links
Moderators
Bucky Roberts Administrator