69.6k views
0 votes
Given the code as follows: main() { int i = 3, n; float x; x = i; n = 8 % x; } What problem will occur? Group of answer choices A compilation error will occur. A run time error will occur. An inheritance error will occur. No problem will occur at all.

1 Answer

4 votes

Answer:

A compilation error will occur.

Step-by-step explanation:

The % operator does not accept a float as its right-hand operand.

User Alex Stanovsky
by
5.2k points