OA. free
Free
Palo Alto Networks Core Computer Science Core Computer Science Medium

Select any one of the following options

Palo Alto Networks technical mcq question, verified with a worked answer. Free to practise - no sign-up.

int main()
{
    if(f(1,0))
        printf("True");
    else
        printf("false");
    return 0;
}

Select any one of the following options

Choose one option.
Show answer & explanation
Answer: C. C) COMPILATION ERROR

The function f is called without any prior declaration or definition, causing a compilation error.

Step-by-step Derivation:
Step 1: Examine the code: if(f(1,0)).
Step 2: Function 'f' has not been declared with a prototype or defined before main.
Step 3: In C99 and standard C++, calling an undeclared function results in a compile-time error.