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
Can you apply link and association interchangeably?
Why & is used in scanf in c?
c language interview questions & answer
What is the symbol indicated the c-preprocessor?
Differentiate between the = symbol and == symbol?
List a few unconditional control statement in c.
Can we change the value of constant variable in c?
What is wrong with this initialization?
What is union and structure?
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...
Why is void main used?
How do I swap bytes?
What are the 4 types of organizational structures?
What is anagram in c?
Write programs for String Reversal & Palindrome check