Multiple choice

What will be the output of the following program?

void func() { printf("Testing...Done"); } void main() { func; func(); }

  1. Compile-Time Error

  2. Testing...Done

  3. Testing...Done

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The line func; is a statement that evaluates the function name but doesn't call it - it's essentially a no-op that gets discarded. Then func(); is called normally and prints "Testing...Done". The first func; is valid but useless, not an error.