Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
void f();
int main()
{
    #define max 10
    f();
    return 0;
}
void f()
{
    printf("%d\n", max * 10);
}

A. 100

B. Compile time error since #define cannot be inside functions

C. Compile time error since max is not visible in f()

D. Undefined behaviour

Answer: Option A


This Question Belongs to C Program >> Function

Join The Discussion

Related Questions on Function