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() { main(); }
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
main( ) { void *vp; char ch = ‘g’, *cp = “goofy”; int j = 20; vp = &ch; printf(“%c”, *(char *)vp); vp = &j; printf(“%d”,*(int *)vp); vp = cp; printf(“%s”,(char *)vp + 3); }
main() { { unsigned int bit=256; printf("%d", bit); } { unsigned int bit=512; printf("%d", bit); } } a. 256, 256 b. 512, 512 c. 256, 512 d. Compile error
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
Write a program to check whether the number is prime and also check if it there i n fibonacci series, then return true otherwise return false
main() { printf("%x",-1<<4); }
find A^B using Recursive function
what is the output of the below program & why ? #include<stdio.h> void main() { int a=10,b=20,c=30; printf("%d",scanf("%d%d%d",&a,&b,&c)); }
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details
How do you sort a Linked List (singly connected) in O(n) please mail to pawan.10k@gmail.com if u can find an anser...i m desperate to knw...
6 Answers Microsoft, MSD, Oracle,