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
how to print the character with maximum occurence and print that number of occurence too in a string given ?
With the help of using classes, write a program to add two numbers.
What are integer variable, floating-point variable and character variable?
what is the structure pointer?
what are non standard function in c
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
What is 2 d array in c?
What is #line in c?
Explain how do you list files in a directory?
How can I determine whether a machines byte order is big-endian or little-endian?
Are the variables argc and argv are local to main?
What is function pointer c?
what are # pragma staments?