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
If you know then define #pragma?
Explain 'bus error'?
Where can I get an ansi-compatible lint?
What is the difference between if else and switchstatement
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
Sir i need notes for structure,functions,pointers in c language can you help me please
What is null pointer constant?
What is a newline escape sequence?
What is the hardest programming language?
What is the use of function in c?
Why malloc is faster than calloc?
#include
what is the function of pragma directive in c?
What is the deal on sprintf_s return value?
Explain argument and its types.