adplus-dvertising

Welcome to the Functions MCQs Page

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

Functions MCQs | Page 21 of 39

Q201.
What will be the output of the program in 16 bit platform (Turbo C under DOS)?
#include<stdio.h>
int main()
{
    extern int i;
    i = 20;
    printf("%d\n", sizeof(i));
    return 0;
}
Discuss
Answer: (d).Linker Error : Undefined symbol 'i'
Q202.
What is the output of the program?
#include<stdio.h>
int main()
{
    extern int a;
    printf("%d\n", a);
    return 0;
}
int a=20;
Discuss
Answer: (a).20
Q203.
What is the output of the program in Turbo C (in DOS 16-bit OS)?
#include<stdio.h>
int main()
{
    char *s1;
    char far *s2;
    char huge *s3;
    printf("%d, %d, %d\n", sizeof(s1), sizeof(s2), sizeof(s3));
    return 0;
}
Discuss
Answer: (c).2, 4, 4
Q204.
What is the output of the program ?
#include<stdio.h>
int main()
{
    struct emp
    {
        char name[20];
        int age;
        float sal;
    };
    struct emp e = {"Tiger"};
    printf("%d, %f\n", e.age, e.sal);
    return 0;
}
Discuss
Answer: (a).0, 0.000000
Q205.
What will be the output of the program?
#include<stdio.h>
int X=40;
int main()
{
    int X=20;
    printf("%d\n", X);
    return 0;
}
Discuss
Answer: (a).20
Q206.
What is the output of the program ?
#include<stdio.h>
int main()
{
    int x = 10, y = 20, z = 5, i;
    i = x < y < z;
    printf("%d\n", i);
    return 0;
}
Discuss
Answer: (b).1
Q207.
What is the output of the program ?
#include<stdio.h>
int main()
{
    extern int fun(float);
    int a;
    a = fun(3.14);
    printf("%d\n", a);
    return 0;
}
int fun(int aa)
{
    return (int)++aa;
}
Discuss
Answer: (d).Compile Error
Q208.
Point out the error in the following program (if it is compiled with Turbo C compiler).
#include<stdio.h>
int main()
{
    display();
    return 0;
}
void display()
{
    printf("Compscibits.com");
}
Discuss
Answer: (c).display() is called before it is defined
Q209.
Point out the error in the following program.
#include<stdio.h>
int main()
{
    int (*p)() = fun;
    (*p)();
    return 0;
}
int fun()
{
    printf("IndiaBix.com\n");
    return 0;
}
Discuss
Answer: (b).Error: fun() prototype not defined
Q210.
The keyword used to transfer control from a function back to the calling function is
Discuss
Answer: (d).return

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!