C Preprocessor

1

Will it result in to an error if a header file is included twice?

A. Yes
B. No
C. It is compiler dependent.

2

Will the program compile successfully?
#include<stdio.h>

int main()

{

      #ifdef  NOTE

            int     a;

            a = 10;

      #else

           int a;

           a=20;

       #endif

        printf("%d`setminus`n" , a)'

        return 0;

}

A. Yes
B. No

3

It is necessary that a header files should have a .h extension?

A. Yes
B. No

4

Would the following typedef work?
typedef #include l;

A. Yes
B. No

5

Will the program compile successfully?

#include<stdio.h>
#define X (4+Y)
#define Y (X+3)

int main()
{
    printf("%d\n", 4*X+2);
    return 0;
}
A. Yes
B. No