CSE MCQs :: C-MCQs
-
What is the output of this C code?
int main()
{
int i = -5;
int k = i %4;
printf("%d\n", k);
} -
What is the output of this C code?
int main()
{
int i = 5;
int l = i / -4;
int k = i % -4;
printf("%d %d\n", l, k);
return 0;
} -
What is the output of this C code?
int main()
{
int i = 7;
i = i / 4;
printf("%d\n", i);
return 0;
} -
What is the value of x in this C code?
void main()
{
int x = 4 *5 / 2 + 9;
} -
What is the output of this C code?
void main()
{
int x = 4.3 % 2;
printf("Value of x is %d", x);
} -
What is the output of this C code?
void main()
{
int y = 3;
int x = 7 % 4 * 3 / 2;
printf("Value of x is %d", x);
} -
What is the output of this C code?
void main()
{
int a = 5;
int b = ++a + a++ + --a;
printf("Value of b is %d", b);
} - The precedence of arithmetic operators is (from highest to lowest)?
- Which of the following is not an arithmetic operation?
- Which of the following data type will throw an error on modulus operation(%)?