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
Tell me can the size of an array be declared at runtime?
What are the rules for the identifier?
What is the explanation for cyclic nature of data types in c?
What does %d do?
What is the use of static variable in c?
What are register variables in c?
what are enumerations in C
How was c created?
Can a pointer be null?
is it possible to create your own header files?
What is identifier in c?
what is recursion in C
Process by which one bit pattern in to another by bit wise operation is?
What is the difference between c and python?
Do you know pointer in c?