Find the output for the following C programmain(){char *ptr = "Ramco Systems";(*ptr)++;printf("%sn",ptr);ptr++;printf("%sn",ptr);}

Samco Systems

Showing Answers 1 - 2 of 2 Answers

Akila

  • Nov 11th, 2007
 

1st  ptr  points  to  R in Ramco Systems  (*ptr++)  then it will increment, so R changed to s  (in alphabetical order) then it will print
                 Samco Systems.
After that ptr will increment so now it will points to next of s (ie:a) 
now it will print
                 amco systems
 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions