Q50
What will be the output of the following C++ code? #include using namespace std; int main() char *ptr; char Str[] = "abcdefg"; ptr = Str; ptr += 5; cout << ptr; return 0;
A.
fg
AnswerB.
cdef
C.
defg
D.
abcd
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board