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
Explain built-in function?
What does c mean in basketball?
What is malloc() function?
What is a list in c?
What is difference between stdio h and conio h?
Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
what are # pragma staments?
Are the expressions * ptr ++ and ++ * ptr same?
what is recursion in C
What are inbuilt functions in c?
Why c is called procedure oriented language?
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Explain what is gets() function?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
Who developed c language?