Question 1: C++ Array Declaration
Which of the following is the correct way to declare an integer array of size 5 in C++?
Question 2: C++ Guess the Output – Array Initialization
What will be the output of the following code?
Question 3: C++ Array Index
What will happen if you try to access arr[10] in an array declared as int arr[5];?
Question 4: C++ Guess the Output – Array Elements
What will be the output of the following code?
Question 5: C++ Size of Array
If we declare int arr[10]; then what is sizeof(arr) (assuming int takes 4 bytes)?
Question 6: C++ Guess the Output – Array Traversal
What will be the output of the following code?
Question 7: C++ Multidimensional Array
How do you correctly declare a 2D array with 3 rows and 4 columns in C++?
Question 8: C++ Guess the Output – Multidimensional Array
What will be the output of the following code?
Question 9: C++ Array and Functions
When an array is passed to a function in C++, what is actually passed?
Question 10: C++ Guess the Output – Array and Pointers
What will the following code print?