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


Please Help Members By Posting Answers For Below Questions

What does volatile do?

742


Explain the use of fflush() function?

831


How we can insert comments in a c program?

843


How many keywords are there in c?

805


What are the different types of control structures in programming?

867


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.

15451


What was noalias and what ever happened to it?

769


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......

1615


What is the difference between #include

and #include “header file”?

763


How can I remove the leading spaces from a string?

830


What is malloc return c?

777


What is the equivalent code of the following statement in WHILE LOOP format?

1076


Explain what is a pragma?

784


Explain #pragma statements.

798


Who is the founder of c language?

874