Which of the following data type will throw an error on modulus operation(%)?

Category: QuestionsWhich of the following data type will throw an error on modulus operation(%)?
Editor">Editor Staff asked 11 months ago

Which of the following data type will throw an error on modulus operation(%)?
 
(a) char
 
(b) short
 
(c) int
 
(d) float
 
I got this question in an interview.
 
This key question is from Arithmetic Operators in division Data Types, Operators and Expressions in C of C
NCERT Solutions for Subject Computer science (C Programming) Select the correct answer from above options 
Interview Questions and Answers, Database Interview Questions and Answers for Freshers and Experience

1 Answers
Editor">Editor Staff answered 11 months ago

Correct answer is (d) float
 
To explain: None.