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

Home > Java Programming > Pointers > Questions and Answers

Q: Predict the output or error(s) for the following?

void main()
{
int const * p=5;
printf("%d",++(*p));
}
A. Compiler error B. 5
C. 6 D. 7

Answer and Explanation

Answer:Compiler error

Explanation:
Compiler error: Cannot modify a constant value.

p is a pointer to a "constant integer".

Comment on this Question

Name:

Loading...




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