-
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int p = 4, q = 4;
float var = q + p /= p / q;
printf("%d %f\n", p, var);
return 0;
}
-
- 5 5.000000
- 5.000000 5
- Compilation Error
- 4
- None of these
Correct Option: C
Compilation Error
main.c: In function ‘main’:
main.c:5:27: error: lvalue required as left operand of assignment
float var = q + p /= p / q;