You can prepare effectively for Class 10 C++ Programming for Beginners with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: C++ Arrays". These 10 questions have been designed by the experts with the latest curriculum of Class 10 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
What is the index number of the last element of an array with 9 elements?
Detailed Solution: Question 1
Which of the following accesses the seventh element stored in array?
Detailed Solution: Question 2
What will be the output of the following C++ code?
#include <stdio.h>
#include<iostream>
using namespace std;
int array1[] = {1200, 200, 2300, 1230, 1543};
int array2[] = {12, 14, 16, 18, 20};
int temp, result = 0;
int main()
{
for (temp = 0; temp < 5; temp++)
{
result += array1[temp];
}
for (temp = 0; temp < 4; temp++)
{
result += array2[temp];
}
cout << result;
return 0;
}
Detailed Solution: Question 3
What will be the output of the following C++ code?
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int a = 5, b = 10, c = 15;
int arr[3] = {&a, &b, &c};
cout << *arr[*arr[1] - 8];
return 0;
}
Detailed Solution: Question 4
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int array[] = {10, 20, 30};
cout << -2[array];
return 0;
}
Detailed Solution: Question 5
Detailed Solution: Question 6
Detailed Solution: Question 7
Which of the following gives the memory address of the first element in array?
Detailed Solution: Question 8
What will be the output of the following C++ code?
#include <stdio.h>
#include<iostream>
using namespace std;
int main ()
{
int array[] = {0, 2, 4, 6, 7, 5, 3};
int n, result = 0;
for (n = 0; n < 8; n++)
{
result += array[n];
}
cout << result;
return 0;
}
Detailed Solution: Question 9
What will be the output of the following C++ code?
#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
char str[5] = "ABC";
cout << str[3];
cout << str;
return 0;
}
Detailed Solution: Question 10
15 videos|20 docs|13 tests |