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 |
void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }
char *someFun1() { char temp[ ] = “string"; return temp; } char *someFun2() { char temp[ ] = {‘s’, ‘t’,’r’,’i’,’n’,’g’}; return temp; } int main() { puts(someFun1()); puts(someFun2()); }
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
Is the following code legal? typedef struct a { int x; aType *b; }aType
why array index always strats wuth zero?
print numbers till we want without using loops or condition statements like specifically(for,do while, while swiches, if etc)!
union u { union u { int i; int j; }a[10]; int b[10]; }u; main() { printf("\n%d", sizeof(u)); printf(" %d", sizeof(u.a)); // printf("%d", sizeof(u.a[4].i)); } a. 4, 4, 4 b. 40, 4, 4 c. 1, 100, 1 d. 40 400 4
Is it possible to print a name without using commas, double quotes,semi-colons?
Write a program that find and print how many odd numbers in a binary tree
void main() { int x,y=2,z; z=(z*=2)+(x=y=z); printf("%d",z); }
1 o 1 1 0 1 0 1 0 1 1 0 1 0 1 how to design this function format in c-language ?
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }