main()
{
int x=20,y=35;
x = y++ + x++;
y = ++y + ++x;
printf("%d %d\n",x,y);
}
Answer Posted / ruchi
Answer is 57 and 94
bcoz precedence of the ++ operator is more than + operator
so y++ and x++ will be evaluated first before addition so
y++ will be 36 and x++ will be 21 after that 36 + 21 = 57
similar reasoning for y = ++y + ++x
| Is This Answer Correct ? | 8 Yes | 9 No |
Post New Answer View All Answers
What is pointer to pointer in c with example?
Explain a pre-processor and its advantages.
What is a newline escape sequence?
How can I pad a string to a known length?
Write a program to print "hello world" without using a semicolon?
What are volatile variables in c?
What is a scope resolution operator in c?
What is structure padding and packing in c?
define string ?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What is the difference between functions getch() and getche()?
What is a method in c?
What type of function is main ()?
What is pointer to pointer in c language?
In a switch statement, explain what will happen if a break statement is omitted?