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 are the 4 types of functions?
What is the use of #include in c?
Is it better to use a macro or a function?
What is break statement?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
When is the “void” keyword used in a function?
List the different types of c tokens?
Explain how can type-insensitive macros be created?
What is c variable?
What is a volatile keyword in c?
application attempts to perform an operation?
How is null defined in c?
How do you use a pointer to a function?
Explain is it valid to address one element beyond the end of an array?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.