728x15 Ads

bar

C....made easy by Mr. Pramod Shetty 6

main()
{
char *p="hai friends",*p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s %s",p,p1);
}


Answer:
ibj!gsjfoet

Explanation:
++*p++ ko ham aise execue karenge.
*p pointer ki current location ki value ko define kar rha hai.
++*p currnet location ki value increment ho jaaegi
iat last pointer ki location increment hogi, that is p++ will be executed

ab sabse pehle pointer h ko point kar rha hai. ab sabse pehle uski value mein increment hoga
then uski location mein...to h se i ho jaegaa and ab pointer "a " ko point karne lagega
aise hi last mein pointer null ko point karega. so p1 points to null.
Copyright © eAZy EnginEEriNG