main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
what is the output?
Answer Posted / c
x=y++ + x++;
here we should assign the value and then the increment
the value and the new value should be stored in a specified
variable....
here it is......
X= 35 (value=36 is stored in y) + 20 ( value=21
is stored in x);
X=55
NOw the value of x=55..and Y=36..the next expression
changes to like this...
Y= 37+56=93
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is array within structure?
How can I find the modification date of a file?
What is n in c?
Explain the difference between null pointer and void pointer.
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
#include main() { char s[] = "Bouquets and Brickbats"; printf(" %c, ",*(&s[2])); printf("%s, ",s+5); printf(" %s",s); printf(" %c",*(s+2)); }
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
What is const and volatile in c?
Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
Explain what header files do I need in order to define the standard library functions I use?
write a c program to calculate sum of digits till it reduces to a single digit using recursion
Does * p ++ increment p or what it points to?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What are the two forms of #include directive?
What is meant by type casting?