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 3 of 17

Explore more Topics under Object Oriented Programming Using C++

Discuss
Answer: (b).p is array of pointer to function
Q22.
What is size of generic pointer in C++ (in 32-bit platform) ?

a.

2

b.

4

c.

8

d.

0

Discuss
Answer: (b).4
Q23.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
       cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]];
       return 0;
   }
Discuss
Answer: (b).21 21 21
Q24.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int i;
       char *arr[] = {"C", "C++", "Java", "VBA"};
       char *(*ptr)[4] = &arr;
       cout << ++(*ptr)[2];
       return 0;
   }
Discuss
Answer: (a).ava
Q25.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int arr[] = {4, 5, 6, 7};
       int *p = (arr + 1);
       cout << *p;
       return 0;
   }

a.

4

b.

5

c.

6

d.

7

Discuss
Answer: (b).5
Q26.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
       int arr[] = {4, 5, 6, 7};
       int *p = (arr + 1);
       cout << arr;
       return 0;
   }
Discuss
Answer: (c).address of arr
Q27.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main ()
   {
       int numbers[5];
       int * p;
       p = numbers;  *p = 10;
       p++;  *p = 20;
       p = &numbers[2];  *p = 30;
       p = numbers + 3;  *p = 40;
       p = numbers;  *(p + 4) = 50;
       for (int n = 0; n < 5; n++)
           cout << numbers[n] << ",";
       return 0;
   }
Discuss
Answer: (a).10,20,30,40,50,
Q28.
What is the output of this program?
   #include <iostream>
   using namespace std;
   int main()
   {
        int arr[] = {4, 5, 6, 7};
        int *p = (arr + 1);
        cout << *arr + 9;
        return 0;
   }
Discuss
Answer: (c).13
Q29.
The constants are also called as
Discuss
Answer: (c).literals
Discuss
Answer: (d).all of the mentioned

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!