Question
What is the output of this program?
#include < iostream >
using namespace std;
int main()
{
char *ptr;
char Str[] = "abcdefg";
ptr = Str;
ptr += 5;
cout
Answer: Option A
Was this answer helpful ?
Pointer ptr points to string 'fg'. So it prints fg.
Was this answer helpful ?
More Questions on This Topic :
Question 4. What is size of generic pointer in c? ....
Question 8. What we can't do on a void pointer? ....
Submit Solution