main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?

Answer Posted / sumeet

Samco Systems
amco Systems

this will be the answer .. the reason being the ascii value
of r will be incremented so it now point to s( capital s
that is ) this account for (*ptr)++

next ptr++ will simply move you to the next charachter ..

Is This Answer Correct ?    20 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me can the size of an array be declared at runtime?

594


What are the rules for the identifier?

667


What is the explanation for cyclic nature of data types in c?

642


What does %d do?

713


What is the use of static variable in c?

593






What are register variables in c?

571


what are enumerations in C

720


How was c created?

586


Can a pointer be null?

558


is it possible to create your own header files?

631


What is identifier in c?

539


what is recursion in C

607


Process by which one bit pattern in to another by bit wise operation is?

613


What is the difference between c and python?

580


Do you know pointer in c?

587