main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?
Answer Posted / dhakchin moorthy.p
first printf stmt prints Ramco Systems
the error is in line ptr++;here u r trying to increment the
address holding by the pointer,pointer var may lost the
starting address.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How can I swap two values without using a temporary?
What is a example of a variable?
Is python a c language?
What are the general description for loop statement and available loop types in c?
What is a built-in function in C?
What does sizeof return c?
What are the different file extensions involved when programming in C?
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is structure in c definition?
I heard that you have to include stdio.h before calling printf. Why?
Which is better pointer or array?
What is derived datatype in c?
What is a newline escape sequence?
Explain what is wrong with this program statement?
What is the purpose of ftell?