C Fundamentals - Study Mode

[#146] What will be the output of the following C code? #include <stdio.h>
void main()
{
int a = 3
int b = ++a + a++ + --a
printf("Value of b is %d", b)
}
Correct Answer

(D) Undefined behaviour

[#147] What will be the output of the following C code? #include <stdio.h>
int main()
{
int i = 0
int x = i++, y = ++i
printf("%d % d
", x, y)
return 0
}
Correct Answer

(A) 0, 2

[#148] Which is valid C expression?
Correct Answer

(B) int my_num = 100000

[#149] What will be the output of the following C code? #include<stdio.h>
int main()
{
int a = 1, b = 2, c = 3, d = 4, e
e = c + d = b * a
printf("%d, %d
", e, d)
}
Correct Answer

(D) Syntax error

[#150] While swapping 2 numbers what precautions to be taken care? b = (b / a)
a = a * b
b = a / b
Correct Answer

(B) Data type should be either of float and double