adplus-dvertising

Welcome to the Pointers,Arrays and Structures in C++ MCQs Page

Dive deep into the fascinating world of Pointers,Arrays and Structures in C++ with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Pointers,Arrays and Structures in C++, a crucial aspect of Object Oriented Programming Using C++. In this section, you will encounter a diverse range of MCQs that cover various aspects of Pointers,Arrays and Structures 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 Object Oriented Programming Using C++.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Pointers,Arrays and Structures in C++. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Object Oriented Programming Using C++.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Pointers,Arrays and Structures in C++. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Pointers,Arrays and Structures in C++ MCQs | Page 1 of 17

Explore more Topics under Object Oriented Programming Using C++

Discuss
Answer: (c).pointer to function taking a char* argument and returns an int
Q2.
The operator used for dereferencing or indirection is ____
Discuss
Answer: (a).*
Discuss
Answer: (a).x is a pointer to a string, y is a string
Q4.
Which one of the following is not a possible state for a pointer.
Discuss
Answer: (d).point to a type
Q5.
Which of the following is illegal?
Discuss
Answer: (c).int i; double* dp = &i;
Q6.
What will happen in this code?
int a = 100, b = 200;
int *p = &a, *q = &b;
p = q;
Discuss
Answer: (b).p now points to b
Q7.
What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        int a = 5, b = 10, c = 15;
        int *arr[ ] = {&a, &b, &c};
        cout << arr[1];
        return 0;
    }
Discuss
Answer: (d).it will return some random number
Q8.
The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is
Discuss
Answer: (c).int ***fun(float*, char**)
Q9.
What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        char arr[20];
        int i;
        for(i = 0; i < 10; i++)
            *(arr + i) = 65 + i;
        *(arr + i) = '\0';
        cout << arr;
        return(0);
    }
Discuss
Answer: (a).ABCDEFGHIJ
Q10.
What is the output of this program?
    #include <iostream>
    using namespace std;
    int main()
    {
        char *ptr;
        char Str[] = "abcdefg";
        ptr = Str;
        ptr += 5;
        cout << ptr;
        return 0;
    }
Discuss
Answer: (a).fg

Suggested Topics

Are you eager to expand your knowledge beyond Object Oriented Programming Using C++? 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!