A

Admin • 833K Points
Coach

Q. What will be the output of the code below?

Code:
int main() {
char str[] = "Hello";
printf("%c", *str);
return 0;
}
  • (A) e
  • (B) H
  • (C) o
  • (D) l
  • Correct Answer - Option(B)
  • Views: 16
  • Filed under category C Programming
  • Hashtags:

Explanation by: Admin

*str points to the first character of the string, which is 'H'.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.