main()
{
char *ptr = "Ramco Systems";
(*ptr)++;
printf("%s\n",ptr);
ptr++;
printf("%s\n",ptr);
}
Find the Outputs?

Answer Posted / sumeet

Samco Systems
amco Systems

this will be the answer .. the reason being the ascii value
of r will be incremented so it now point to s( capital s
that is ) this account for (*ptr)++

next ptr++ will simply move you to the next charachter ..

Is This Answer Correct ?    20 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What will the preprocessor do for a program?

598


Which is more efficient, a switch statement or an if else chain?

589


What are the 32 keywords in c?

646


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1268


When was c language developed?

710






What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.

3739


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2420


What is the right type to use for boolean values in c? Is there a standard type?

576


What is strcpy() function?

664


Can two or more operators such as and be combined in a single line of program code?

817


c language interview questions & answer

1469


What is static and volatile in c?

791


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

624


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1316


Write a program of prime number using recursion.

631