adplus-dvertising

Welcome to the Macro and Preprocessor MCQs Page

Dive deep into the fascinating world of Macro and Preprocessor with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Macro and Preprocessor, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Macro and Preprocessor, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Macro and Preprocessor. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Macro and Preprocessor. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Macro and Preprocessor MCQs | Page 7 of 8

Discuss
Answer: (b).A file named stdio.h will be searched in current directory and included if found
Discuss
Answer: (c).A file named stdio.h will be searched in current directory and pre configured list of directories in search path and included if found
Q63.
In Turbo C, Search Path of Directories for #Include is mentioned under the option
Discuss
Answer: (a).Include Directories
Discuss
Answer: (d).#ifdef macroname
statement1;
statement2;
#else
statement3;
statement4;
#endif
Q65.
What is the output of C program with conditional compilation commands?
#define CVV 156
int main()
{
    #ifdef CVV
        printf("CVV YES");
    #else
        printf("CVV NO");
    #endif
    return 0;
}
Discuss
Answer: (c).CVV YES
Q66.
What is the output of C program with preprocessor directives?
#define CVV 156
int main()
{
    #ifdef cvv
        printf("CVV YES");
    #else
        printf("CVV NO");
    #endif
    return 0;
}int main()
{
    #ifdef CVV
        printf("CVV YES");
    #else
        #define CVV 199
    #endif
    printf("NEW CVV=%d",CVV);
    return 0;
}
Discuss
Answer: (d).NEW CVV=199
Q67.
What is the output of C program?
int main()
{
    #ifndef CVV
        #define CVV 199
        printf("CVV=%d", CVV);
    #else
        printf("CVV=%d", 188);
    #endif
    return 0;
}
Discuss
Answer: (c).CVV=199
Q68.
What is the output of C program with Preprocessor directives?
void show();
int main()
{
    #ifndef CVV
        #define CVV 199
    #endif
    show();
    return 0;
}
void show()
{
    printf("CVV=%d",CVV);
}
Discuss
Answer: (c).CVV=199
Q69.
What is the output of C program with preprocessor directives?
int main()
{
    #ifdef CVV
        #define CVV 199
    #elif PVV
        printf("Inside ELIF");
    #else
        printf("Inside ELSE");
    #endif
    return 0;
}
Discuss
Answer: (b).Inside ELSE
Q70.
What is the output of C program with #undef?
#define BIRD 5
int main()
{
    #ifdef BIRD
        printf("BIRD=5.");
    #else
        printf("UNKNOWN.");
    #endif
    #undef BIRD
    #define BIRD 10
    printf("BIRD=%d",BIRD);
    return 0;
}
Discuss
Answer: (c).BIRD=5.BIRD=10
Page 7 of 8

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!