ExamTray App is now Available on Google Play EXAMTRAY android app link

 

TOTAL QS = 10Time [ 00 : 00 : 00 ]
00:00:00

C Programming Basics Tutorial - PreProcessor Directives - Online Test 1

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam or MCQ Quiz tests your C Preprocessor Directives like Macros, Conditional Compilation(#IFDEF, #ENDIF), File Inclusion #INCLUDE, #UNDEF, #PRAMA etc. Examples are given as questions and answers. Easily Attend Competitive Exams and Job Interview Questions.

All the Best

1) What are the types of C Preprocessor Directives.?
2) Processor Directive in C language starts with.?
3) Preprocessor in C language works on.?
4) What is the another name for .C file.?
5) What is the keyword used to define a C macro.?
6) What is the output of C program with #define.?
#define CVV 156
int main()
{
    int a=10;
    a = a*CVV;
    printf("CVV=%d",a);
    return 0;
}
7) What is the C keyword used to create global Constants.?
8) Choose a correct C statement about #define statement.?
#define CVV 156
9) What is the output file generated after processing a .C file.?
10) How do you safeguard your .C file code from copying by outside developers or world.?
11) What is the output of C program with macros.?
#define ERRMSG printf("Some error.");
int main()
{
    printf("JAR.");
    ERRMSG;
    return 0;
}
12) What is the output of C program with macros.?
#define ERRMSG(a) printf("Error=%d",a);
int main()
{
    ERRMSG(10);
    return 0;
}
13) What is the output of C program.?
#define LOGIC(a,b) (a==b)
int main()
{
    if(LOGIC(5,5))
    {
        printf("SAME ");
    }
    return 0;
}
14) How do you separate a multiline macro in C language.?
15) What is the output of C program.?
#define LOOP(a) for(int i=1;i<=a;i++) \
{printf("%d ",i);}
int main()
{
    LOOP(5);
    return 0;
}
16) What is the output of C program.?
#define TANK(a) a*10+2
int main()
{
    int a = TANK(2)*2;
    printf("%d",a);
    return 0;
}
17) What is the file extension of expanded source code of .C file after preprocessing.?
18) What is the command to preprocess a C file manually.?
19) Choose a correct statement about C Macro.?
20) What is the C Preprocessor directive to be used to add a header file or any file to existing C program.?