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 |
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { struct date; struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }
what is brs test reply me email me kashifabbas514@gmail.com
main() { int x=5; for(;x!=0;x--) { printf("x=%d\n", x--); } } a. 5, 4, 3, 2,1 b. 4, 3, 2, 1, 0 c. 5, 3, 1 d. none of the above
main ( ) { static char *s[ ] = {“black”, “white”, “yellow”, “violet”}; char **ptr[ ] = {s+3, s+2, s+1, s}, ***p; p = ptr; **++p; printf(“%s”,*--*++p + 3); }
union u { struct st { int i : 4; int j : 4; int k : 4; int l; }st; int i; }u; main() { u.i = 100; printf("%d, %d, %d",u.i, u.st.i, u.st.l); } a. 4, 4, 0 b. 0, 0, 0 c. 100, 4, 0 d. 40, 4, 0
Printf can be implemented by using __________ list.
to remove the repeated cahracter from the given caracter array. i.e.., if the input is SSAD output should of SAD
void main() { int i=5; printf("%d",i+++++i); }
main() { int i, j, *p; i = 25; j = 100; p = &i; // Address of i is assigned to pointer p printf("%f", i/(*p) ); // i is divided by pointer p } a. Runtime error. b. 1.00000 c. Compile error d. 0.00000