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
What does volatile do?
Explain the use of fflush() function?
How we can insert comments in a c program?
How many keywords are there in c?
What are the different types of control structures in programming?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
What was noalias and what ever happened to it?
can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......
What is the difference between #include
How can I remove the leading spaces from a string?
What is malloc return c?
What is the equivalent code of the following statement in WHILE LOOP format?
Explain what is a pragma?
Explain #pragma statements.
Who is the founder of c language?