?
What will be the output?
What will be the output?
main()
{
char *p;
p = "Hello";
printf("%cn",*&*p);
}
main()
{
char *p;
p = "Hello";
printf("%cn",*&*p);
}
Answer & Solution
Correct Answer:
Option
B
* 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.
Join the Discussion
Login to post a comment or share your explanation.
Login'b'.