C Programming :: Declarations and Initializations - Discussion
Home > C Programming > Declarations and Initializations > MCQs Questions Discussion
32 / 54
What will be output of the following "c" code?
#include<stdio.h>
void main ()
{
int x =400, y;
y = x*x+x;
printf ("% d", y);
}
#include<stdio.h>
void main ()
{
int x =400, y;
y = x*x+x;
printf ("% d", y);
}
A400
B320000
CCompilation Error
D160400
Answer: Option (Login/Signup)
Show Explanation
Asked In ::
TRICK
garbeg value will come.. 160400 is not possible becoze int rage is out of bound size of int is -32768 to 32767
Read Full Answer
Report Error
Please Login First Click Here
STEP-BY-STEP
In line 5-
y=x*x+x
or, y=400*400+400
or, y=160000+400
or, y=160400
Therefore, option D.
Read Full Answer
Report Error
Please Login First Click Here