main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
what is the output?
Answer Posted / sagar
here first in x = y++ + x++;
= (35+1) + (20+1);//here value of x is not
= 36 + 21; assigned to 21 as x++
= 57... and 'lly to y++....
now the value of x = 57.
now for y = ++y + ++x;
= (1+35) + (1+57);
= 36 + 58;
= 94...
therefore,after performing all operatioins we get,
x==57 And y==94....
Is This Answer Correct ? | 6 Yes | 4 No |
Post New Answer View All Answers
What are # preprocessor operator in c?
What is file in c language?
What does a function declared as pascal do differently?
What is a stream?
What language is c written?
What is bubble sort in c?
What is data structure in c programming?
What are identifiers c?
what is different between auto and local static? why should we use local static?
What is calloc malloc realloc in c?
What is volatile variable in c with example?
Explain what is page thrashing?
we called a function and passed something do it we have always passed the "values" of variables to the called function. such functions calles are called a) calls by reference b) calls by value c) calls by zero d) none of the above
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are the different data types in C?