C Fundamentals - Study Mode
[#111] What will be the output of the following C code? #include <stdio.h>
void main()
{
double x = 123828749.66
int y = x
printf("%d
", y)
printf("%lf
", y)
}
Correct Answer
(D) 123828749, 0.000000
[#112] What will be the final value of x in the following C code? #include <stdio.h>
void main()
{
int x = 5 * 9 / 3 + 9
}
Correct Answer
(C) 24
[#113] What will be the output of the following C code? #include<stdio.h>
enum Ram
{
a=1,b
}
enum Shyam
{
c,d
}
int main()
{
enum Shyam s1=c
enum Shyam s=a
enum Ram s2=d
printf("%d",s)
printf("%d",s1)
printf("%d",s2)
}
Correct Answer
(D) 101
[#114] What will be the output of the following C code? #include <stdio.h>
void main()
{
float x = 0.1
printf("%d, ", x)
printf("%f", x)
}
Correct Answer
(B) Junk value, 0.100000
[#115] What will be the output of the following C code? #include <stdio.h>
void main()
{
int x = 4, y, z
y = --x
z = x--
printf("%d%d%d", x, y, z)
}
Correct Answer
(B) 2 3 3