//https://[Log in to view URL]
/*
In C/C++, precedence of Prefix ++ (or Prefix –) has same priority than
dereference (*) operator, and precedence of Postfix ++ (or Postfix –) is
higher than both Prefix ++ and *.
If p is a pointer then *p++ is equivalent to *(p++) and ++*p is equivalent
to ++(*p) (both Prefix ++ and * are right associative).
*/
// Program 2
#include<stdio.h>
int main()
{
char arr[] = "gkf";
char *p = arr;
*p++;
printf(" %c", *p);
getchar();
return 0;
}//e
#if 0
// Program 1
#include<stdio.h>
int main()
{
char arr[] = "geeksforgeeks";
char *p = arr;
++*p;
printf(" %c", *p);
getchar();
return 0;
}//h
#endif
/*
#include <iostream>
using namespace std;
int main()
{
string fullName[] = {"Joe", "Donaldson"};
string *ptr = fullName;
cout << *ptr << "'s Last Name is ";
*ptr++;
cout << *ptr << endl;
}//Joe's Last Name is Donaldson
*/
To embed this program on your website, copy the following code and paste it into your website's HTML: