Welcome Guest | Sign in | Register
Pointers - Discussion Page For Q.10775 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Pointers > Questions and Answers

Q: What will be the output

main()
{
char *ptr = "Pskills.org";
char a =
printf("%c", ++*ptr++);
}
A. Compilation Error B. Q
C. P D. a

Answer and Explanation

Answer:Q

Explanation:
++*ptr++ will retrieve the value currently pointed by ptr i.e P and then increment the value and will print Q.

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.