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
Do you know the difference between exit() and _exit() function in c?
What is mean by data types in c?
write a program to print largest number of each row of a 2D array
How many levels of pointers have?
Why is it usually a bad idea to use gets()? Suggest a workaround.
What is the difference between single charater constant and string constant?
What is the difference between char array and char pointer?
what is the format specifier for printing a pointer value?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
What is sorting in c plus plus?
Can an array be an Ivalue?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
How would you use the functions fseek(), freed(), fwrite() and ftell()?
Explain the difference between ++u and u++?
Explain what header files do I need in order to define the standard library functions I use?