wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Macro and Macro preprocessor

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What are the types of C Preprocessor Directives.?

a)

Macros

b)

Conditional Compilation

c)

File Inclusion

d)

All the above

2.

Processor Directive in C language starts with.?

a)

$ symbol (DOLLAR)

b)

@ symbol (At The Rate)

c)

& symbol (Ampersand)

d)

# symbol (HASH)

3.

What is the keyword used to define a C macro.?

a)

def

b)

definition

c)

define

d)

defy

4.

What is the output file generated after processing a .C file.?

a)

.h file

b)

.exe file

c)

.cp file

d)

.bak file

5.

What is the output of following program?

#include <stdio.h>

#define macro(n, a, i, m) m##a##i##n

#define MAIN macro(n, a, i, m)


int MAIN()

{

printf("SVERI");

return 0;

}

a)

Compiler Error

b)

SVERI

c)

MAIN

d)

main

6.

The translator which perform macro expansion is called a

a)

Macro processor

b)

Macro pre-processor

c)

Micro pre-processor

d)

assembler

7.

The process of assigning a label or macroname to the string is called

a)

a)

initialising macro

b)

initialising string macro

c)

defining a string macro

d)

defining a macro

8.

A macro within a macro is called

a)

a)

macro-within-macro

b)

nested macro

c)

macro-in-macro

d)

none of the mentioned

9.

The beginning of the macro can be represented as

a)

START

b)

BEGIN

c)

MACRO

d)

None of the mentioned

10.

The end of a macro can be represented by the directive.

a)

END

b)

ENDS

c)

ENDM

d)

ENDD