Pointers And References In C Plus Plus - Study Mode

[#71] Regarding the following statement which of the statements is true? const int a = 100
Correct Answer

(C) Declares a constant a whose value will be 100

[#72] What will be the output of the following C++ code? #include <iostream>
using namespace std
int main()
{
char *ptr
char Str[] = "abcdefg"
ptr = Str
ptr += 5
cout << ptr
return 0
}
Correct Answer

(A) fg

[#73] 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
}
Correct Answer

(C) Error

[#74] Choose the right option. string* x, y
Correct Answer

(A) x is a pointer to a string, y is a string

[#75] What will be the output of the following C++ code? #include <iostream>
using namespace std
int main()
{
int n = 5
void *p = &n
int *pi = static_cast<int*>(p)
cout << *pi << endl
return 0
}
Correct Answer

(A) 5