Vidyalelo
C++ Programming · Q84

Pointers and References in C++

Programming · C++ Programming · question 84

Q84

What will be the output of the following C++ code? #include using namespace std; int func(void *Ptr); int main() char *Str = "abcdefghij"; func(Str); return 0; int func(void *Ptr) cout << Ptr; return 0;

A.
abcdefghij
B.
address of string "abcdefghij"
Answer
C.
compile time error
D.
runtime error

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board