C Fundamentals - Study Mode
[#131] What will be the output of the following C code? #include <stdio.h>
void main()
{
int h = 8
int b = 4 * 6 + 3 * 4 < 3 ? 4 : 3
printf("%d
", b)
}
Correct Answer
(A) 3
[#132] What will be the output of the following C code? #include <stdio.h>
void main()
{
int x = 0
if (x = 0)
printf("Its zero
")
else
printf("Its not zero
")
}
Correct Answer
(A) Its not zero
[#133] What will be the output of the following C code? #include <stdio.h>
void main()
{
int x = 4
int *p = &x
int *k = p++
int r = p - k
printf("%d", r)
}
Correct Answer
(C) 1
(G) 1
[#134] What will be the output of the following C code? (If the name entered is: Shyam) #include<stdio.h>
#include<string.h>
typedef struct employee
{
char name[50]
int salary
} e1
void main( )
{
printf("Enter Employee name")
scanf("%s",e1.name)
printf("
%s",e1.name)
}
Correct Answer
(D) Error
[#135] What will be the output of the following C code? #include <stdio.h>
int main()
{
int a = -1, b = 4, c = 1, d
d = ++a && ++b || ++c
printf("%d, %d, %d, %d
", a, b, c, d)
return 0
}
Correct Answer
(A) 0, 4, 2, 1