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
What will the preprocessor do for a program?
Which is more efficient, a switch statement or an if else chain?
What are the 32 keywords in c?
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
When was c language developed?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?
What is the right type to use for boolean values in c? Is there a standard type?
What is strcpy() function?
Can two or more operators such as and be combined in a single line of program code?
c language interview questions & answer
What is static and volatile in c?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Write a program of prime number using recursion.