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 6 of 39

Q51.
What is the output of this C code (without linking the source file in which ary1 is defined)?
#include <stdio.h>
    int main()
    {
        extern ary1[];
        printf("scope rules\n");
    }
Discuss
Answer: (a).scope rules
Q52.
What is the output of this C code after linking with source file having definition of ary1?
#include <stdio.h>
    int main()
    {
        extern ary1[];
        printf("%d\n", ary1[0]);
    }
Discuss
Answer: (d).Compile time error because datatype of array is not provided
Discuss
Answer: (d).From the point of declaration to the end of the file being compiled
Discuss
Answer: (d).From the point of declaration to the end of the file being compiled
Q55.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        int i;
        for (i = 0;i < 5; i++)
        int a = i;
        printf("%d", a);
    }
Discuss
Answer: (c).Syntax error in declaration of a
Q56.
Which variable has the longest scope?
#include <stdio.h>
    int b;
    int main()
    {
        int c;
        return 0;
    }
    int a;
Discuss
Answer: (b).b
Q57.
Comment on the output of this 2 C code?
#include <stdio.h> //Program 1
    int main()
    {
        int a;
        int b;
        int c;
    }
 
    
Discuss
Answer: (c).All operation in Program 1 can also be performed in Program 2
Q58.
The sequence of allocation and deletion of variables for the following code is.
#include <stdio.h>
    int main()
    {
        int a;
        {
            int b;
        }
    }
Discuss
Answer: (b).a->b, b->a
Q59.
Array sizes are optional during array declaration by using ______ keyword.
Discuss
Answer: (c).extern
Q60.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int x = 3;
        {
            x = 4;
            printf("%d", x);
        }
    }
Discuss
Answer: (a).4
Page 6 of 39

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!