main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?
Answer Posted / ruchi
Turbo c will give an answer
samco system
amco system
pointer ptr is at r
by(*ptr)++ we are incrementing it by one so we get s
by ptr ++ we are incrementing the addrestion of ptr so it
will give an output amco system;
but gcc compiler will not give any answer it will print
segmentation fault
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What are header files why are they important?
I have a varargs function which accepts a float parameter?
Explain what is the difference between null and nul?
Explain how are portions of a program disabled in demo versions?
What is f'n in math?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
What the different types of arrays in c?
What is the usage of the pointer in c?
Tell me with an example the self-referential structure?
What are the scope of static variables?
hi any body pls give me company name interview conduct "c" language only
What is the difference between %d and %i?
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
How to write c functions that modify head pointer of a linked list?
What is linear search?