MCQ Single Best Answer Not Set

QWhat is the output of this C code?

#include<stdio.h> 
void main()
{
	int x = 4.3 % 2;
	printf("Value of x is %d", x);
}

ID: #1164 Operators and Enums in C Language 2,254 views
Question Info
#1164Q ID
Not SetDifficulty
Operators and Enums in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A Value of x is 1.3
  • B Value of x is 2
  • C Value of x is 0.3
  • D Compile time error
Correct Answer: Option D

Explanation

invalid operands to binary %

Share This Question

Challenge a friend or share with your study group.