To solve this question, the user needs to understand how pointers work in C and the order of operations in the given code.
Initially, ptr
points to the first character of the string "Cisco Systems".
The expression *ptr++
increments the pointer ptr
to point to the next character, but dereferences the original pointer to get the value of the first character. Therefore, this operation has no effect on the value of ptr
.
The expression ptr++
increments the pointer again, so that it now points to the second character of the string.
Finally, the printf
function is called, which outputs the string starting from the second character.
Therefore, the correct answer is:
The Answer is: B. isco Systems