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

Can you apply link and association interchangeably?

665


Why & is used in scanf in c?

616


c language interview questions & answer

1455


What is the symbol indicated the c-preprocessor?

690


Differentiate between the = symbol and == symbol?

704






List a few unconditional control statement in c.

555


Can we change the value of constant variable in c?

566


What is wrong with this initialization?

584


What is union and structure?

567


write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...

1481


Why is void main used?

613


How do I swap bytes?

626


What are the 4 types of organizational structures?

619


What is anagram in c?

510


Write programs for String Reversal & Palindrome check

594