adplus-dvertising

Welcome to the Pointers and Arrays in C MCQs Page

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

Pointers and Arrays in C MCQs | Page 13 of 53

Explore more Topics under C Programming

Discuss
Answer: (a).char *string = β€œHello.”;
Discuss
Answer: (a).int a[][] = {{1, 2, 3}, {2, 3, 4, 5}};
Discuss
Answer: (d).All of the mentioned
Discuss
Answer: (c).The definition only allocates 10 pointers and does not initialize them & Initialization must be done explicitly
Q125.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        char a[10][5] = {"hi", "hello", "fellows"};
        printf("%s", a[2]);
    }
Discuss
Answer: (c).fello
Q126.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        char a[10][5] = {"hi", "hello", "fellows"};
        printf("%p\n", a);
        printf("%p", a[0]);
    }
Discuss
Answer: (a).same address is printed
Q127.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        char a[10][5] = {"hi", "hello", "fellows"};
        printf("%d", sizeof(a[1]));
    }

a.

2

b.

4

c.

5

d.

10

Discuss
Answer: (c).5
Q128.
What is the output of the code given below?
#include <stdio.h>
    int main()
    {
        char a[1][5] = {"hello"};
        printf("%s", a[0]);
        return 0;
    }
Discuss
Answer: (c).Undefined behaviour
Q129.
What is the output of the code given below?
#include <stdio.h>
    int main()
    {
        char *a[1] = {"hello"};
        printf("%s", a[0]);
        return 0;
    }
Discuss
Answer: (b).hello
Q130.
Which of the following statements are true?
P. Pointer to Array
Q. Multi-dimensional array
Discuss
Answer: (c).P are dynamic, Q are static

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!