What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 2;
float f = y + x /= x / y;
printf(“%d %f\n”, x, f);
return 0;
}
a) 2 4.000000
b) Compile time error
c) 2 3.500000
d) Undefined behaviour
Answer: b
Related Posts
A queue follows __________
The data structure required for Breadth First Traversal on a graph is?
A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as _____________
Which data structure is used for implementing recursion?
The prefix form of an infix expression (p + q) – (r * t) is?
What is the result of the following operation?
Top (Push (S, X))The prefix form of A-B/ (C * D ^ E) is?
Join The Discussion