why is printf("%d %d %d",i++,--i,i--);
Answers were Sorted based on User's Feedback
Answer / rick g
if: i = (-1)
-1, -1, -1
(1) Print '-1', then post-increment i. i is now 0.
(2) Pre-decrement i. i is now back to -1. Print '-1'
(3) Print '-1', then post-decrement i. i is now -2
Is This Answer Correct ? | 2 Yes | 0 No |
main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }
Display the time of the system and display the right time of the other country
How will you print % character? a. printf(“\%”) b. printf(“\\%”) c. printf(“%%”) d. printf(“\%%”)
main() { int i = 3; for (;i++=0;) printf(“%d”,i); }
write the function. if all the character in string B appear in string A, return true, otherwise return false.
Is it possible to type a name in command line without ant quotes?
Who could write how to find a prime number in dynamic array?
hello sir,is there any function in C that can calculate number of digits in an int type variable,suppose:int a=123; 3 digits in a.what ll b answer?
program to find magic aquare using array
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
main() { int c[ ]={2.8,3.4,4,6.7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf(" %d ",*c); ++q; } for(j=0;j<5;j++){ printf(" %d ",*p); ++p; } }