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 10 of 53

Q91.
Which of the following declaration throw run-time error?
Discuss
Answer: (d).none of the mentioned
Q92.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        int a = 10;
        int **c -= &&a;
    }
Discuss
Answer: (b).We don’t have address of an address operator
Q93.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int a[2][3] = {1, 2, 3, 4, 5};
        int i = 0, j = 0;
        for (i = 0; i < 2; i++)
        for (j = 0; j < 3; j++)
        printf("%d", a[i][j]);
    }
Discuss
Answer: (a).1 2 3 4 5 0
Q94.
What is the output of this C code?
#include <stdio.h>
    void main()
    {
        int a[2][3] = {1, 2, 3, , 4, 5};
        int i = 0, j = 0;
        for (i = 0; i < 2; i++)
        for (j = 0; j < 3; j++)
        printf("%d", a[i][j]);
    }
Discuss
Answer: (b).Compile time error
Q95.
What is the output of this C code?
#include <stdio.h>
    void f(int a[][3])
    {
        a[0][1] = 3;
        int i = 0, j = 0;
        for (i = 0; i < 2; i++)
        for (j = 0; j < 3; j++)
        printf("%d", a[i][j]);
    }
    void main()
    {
        int a[2][3] = {0};
        f(a);
    }
Discuss
Answer: (a).0 3 0 0 0 0
Q96.
What is the output of this C code?
#include <stdio.h>
    void f(int a[][])
    {
        a[0][1] = 3;
        int i = 0, j = 0;
        for (i = 0;i < 2; i++)
        for (j = 0;j < 3; j++)
        printf("%d", a[i][j]);
    }
    void main()
    {
        int a[2][3] = {0};
        f(a);
    }
Discuss
Answer: (c).Compile time error
Q97.
What is the output of this C code?
#include <stdio.h>
    void f(int a[2][])
    {
        a[0][1] = 3;
        int i = 0, j = 0;
        for (i = 0;i < 2; i++)
        for (j = 0;j < 3; j++)
        printf("%d", a[i][j]);
    }
    void main()
    {
        int a[2][3] = {0};
        f(a);
    }
Discuss
Answer: (c).Compile time error
Discuss
Answer: (b).A pointer “a” to an array
Q99.
Comment on the 2 arrays regarding P and Q:

int *a1[8];
int *(a3[8]);
P. Array of pointers
Q. Pointer to an array
Discuss
Answer: (b).a1 is P, a2 is P
Q100.
Which of the following is not possible statically in C?
Discuss
Answer: (a).Jagged Array

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!