NEW
Font size
WorksheetsMacro and Macro preprocessor
Total questions: 10
Worksheet time: 5mins
What are the types of C Preprocessor Directives.?
Macros
Conditional Compilation
File Inclusion
All the above
Processor Directive in C language starts with.?
$ symbol (DOLLAR)
@ symbol (At The Rate)
& symbol (Ampersand)
# symbol (HASH)
What is the keyword used to define a C macro.?
def
definition
define
defy
What is the output file generated after processing a .C file.?
.h file
.exe file
.cp file
.bak file
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;
}
Compiler Error
SVERI
MAIN
main
The translator which perform macro expansion is called a
Macro processor
Macro pre-processor
Micro pre-processor
assembler
The process of assigning a label or macroname to the string is called
a)
initialising macro
initialising string macro
defining a string macro
defining a macro
A macro within a macro is called
a)
macro-within-macro
nested macro
macro-in-macro
none of the mentioned
The beginning of the macro can be represented as
START
BEGIN
MACRO
None of the mentioned
The end of a macro can be represented by the directive.
END
ENDS
ENDM
ENDD
