Recent questions tagged programming-in-c

1 votes
1 answer
513
2 votes
2 answers
515
2 votes
2 answers
516
0 votes
1 answer
520
Can someone tell me, why these two same program giving different output?Is there any problem in code or compiler not producing right?Program1Program2
0 votes
1 answer
527
X=2;Y=++x * ++x * ++x ;Printf("%d",Y);In the above question, we have to use the final value of x or it will be evaluated seperately and then multiplied.Ex: Y= 3*4*5; or Y...
1 votes
1 answer
529
1 votes
3 answers
532
What is the output of the program? int main() { union a { int i; char ch ; }; union a u; u.ch[0] = 3; u.ch = 2; printf("%d, %d, %d", u.ch[0], u.ch , u.i); return 0; }
1 votes
2 answers
535
#include <stdio.h>int main() { int i = 258;int *iptr = &i;printf("%d",*(char*)iptr);printf("%d",*(char*)iptr+1); }Please explain the solution.
1 votes
0 answers
540