adplus-dvertising

Welcome to the Library Functions MCQs Page

Dive deep into the fascinating world of Library Functions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Library Functions, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Library Functions, 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 Library Functions. 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 Library Functions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Library Functions MCQs | Page 3 of 13

Explore more Topics under C Programming

Q21.
What will be the output of the program?
#include<stdio.h>
#define int char 
void main()
{
      int i = 65;
      printf("sizeof(i)=%d", sizeof(i));
}
Discuss
Answer: (b).sizeof(i)=1
Q22.
What will be the output of the following program?
#include<stdio.h>
#define square(x) x*x 
void main()
{ 
      int i; 
      i = 64/square(4); 
      printf("%d", i); 
}
Discuss
Answer: (b).64
Q23.
What will be the output of the program code?
#include<stdio.h>
#define a 10
void main()
{
      #define a 50
      printf("%d", a);
}
Discuss
Answer: (a).50
Q24.
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.
Discuss
Answer: (d).I, II, III and IV
Q25.
Determine output:
#include<stdio.h>
#define clrscr() 100
void main()
{
      clrscr();
      printf("%dn", clrscr());
}
Discuss
Answer: (c).100
Q26.
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));
}
Discuss
Answer: (c).10
Q27.
In which stage the following code
#include<stdio.h>
gets replaced by the contents of the file stdio.h
Discuss
Answer: (a).During Preprocessing
Q28.
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++);
}
Discuss
Answer: (d).Compiler Error
Q29.
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
}
Discuss
Answer: (b).10..10
Q30.
The output of the following program is:
#define f(g,g2) g##g2
void main()
{
   int var12=100;
   printf("%d", f(var,12));
}
Discuss
Answer: (d).100

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!