GATE 1996
February 1, 2024
Programming
February 1, 2024
GATE 1996
February 1, 2024
Programming
February 1, 2024

Question 8492 – Operator

Which of the following ‘C’ language arithmetic expressions has logical error?

Correct Answer: B

Question 2 Explanation: 
→In the option B, -10%-2 gives remainder of “0” and then expression becomes 4/0/3.
→4/0 gives divide by zero error.
A
-13 % -5 + 3;
B
4 / (-10 % -2) / 3;
C
3 / (-13 % -5) / 3;
D
-5 % 3 / 13;
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!