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
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Write a program on swapping (100, 50)
What is the code for 3 questions and answer check in VisualBasic.Net?
What is 'bus error'?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
What is ctrl c called?
Write a program to identify if a given binary tree is balanced or not.
What are near, far and huge pointers?
What does the c preprocessor do?
c language interview questions & answer
What is a constant and types of constants in c?
What is static memory allocation?
What is difference between constant pointer and constant variable?
How can this be legal c?
What is difference between structure and union in c?