Home » Technical Questions » Programming

main() { char *p; p = "Hello"; printf ("%cn", *&*p); }

Correct Answer: H

Explanation:

* is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again & references it to an address and * dereferences it to the value H


← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion