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? What are their uses?
How do you use a 'Local Block'?
What is the difference between array and pointer in c?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
What is anagram in c?
What are multibyte characters?
Explain setjmp()?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What's the right way to use errno?
Explain what is the heap?
What is the significance of an algorithm to C programming?
What is "Duff's Device"?
Differentiate between declaring a variable and defining a variable?
How can I read/write structures from/to data files?
What is n in c?