Question 1 of 25
Hints left: 3
Q1
How do you declare a reference variable in C++?
Q2
How do you declare a constant pointer to an integer variable in C++?
Q3
What is a null reference in C++?
Q4
What does the 'new' keyword do in C++?
Q5
What is the output of the following code: int x = 10; int *ptr = &x; cout << *ptr << " " << ptr; in C++?
Q6
What is a pointer arithmetic in C++?
Q7
What is a dangling pointer in C++?
Q8
Choose the right option. string* x, y;
Q9
What is the output of the following code: int arr[3] = {1, 2, 3}; int *ptr = arr; cout << *(ptr + 1); in C++?
Q10
What is the purpose of the 'this' pointer in C++?
Q11
What is the correct way to pass a pointer to a function in C++?
Q12
What does the 'sizeof' operator return when used with a pointer variable in C++?
Q13
What is a pointer to a pointer known as in C++?
Q14
What we can't do on a void pointer?
Q15
What is the output of the following code: char str[] = "Hello"; cout << sizeof(str); in C++?
Q16
What is the purpose of the 'const' keyword in a pointer declaration in C++?
Q17
What is a memory leak in C++?
Q18
What is the output of the following code: int arr[3] = {1, 2, 3}; cout << *(arr + 2); in C++?
Q19
What will be the output of the following C++ code? #include <iostream> using namespace std; int main() { int const p = 5; cout << ++p; return 0; }
Q20
What happens when a reference is declared but not initialized in C++?
Q21
What does the 'nullptr' keyword signify when used as a pointer value in C++?
Q22
What is the purpose of a null pointer in C++?
Q23
What is the address-of operator in C++?
Q24
What is the purpose of the 'delete' keyword in C++?
Q25
What is the output of the following code: int arr[] = {1, 2, 3}; cout << *arr; in C++?