Q.1
Choose the correct statement.
I.   The scope of a macro definition need not be the entire program.
II.  The scope of a macro definition extends from the point of definition to the end of the file.
III. New line is a macro definition delimiter.
IV.  A macro definition may go beyond a line.
Q.2
What will be the output of the following program?
#include<stdio.h>
#define prod(a,b)  a*b
void main()
{
      int x=3,y=4;
      printf("%d", prod(x+2,y-1));
}
Q.3
In which stage the following code
#include<stdio.h>
gets replaced by the contents of the file stdio.h
Q.4
What will be output after executing following code?
#include
# define a 10
void main()
{
    printf("%d..", a);
    foo();
    printf("%d", a);
}
void foo()
{
   #undef a
   #define a 50
}
Q.5
The output of the following program is:
#define f(g,g2) g##g2
void main()
{
   int var12=100;
   printf("%d", f(var,12));
}
Q.6
Determine output:
#include<stdio.h>
#define clrscr() 100
void main()
{
      clrscr();
      printf("%dn", clrscr());
}
Q.7
Find the output of the following program.
#define INC(X) X++
void main()
{
   int x=4;
   printf("%d", INC(x++));
}
Q.8
What will be output if you will compile and execute the following c code?
#include<stdio.h>
#define max 5
void main(){
    int i = 0;
    i = max++;
    printf("%d", i++);
}
0 h : 0 m : 1 s