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
πŸ’¬ Discuss
βœ… Correct Answer: (B) H
Explanation: *str points to the first character of the string, which is 'H'.
Explanation by: Mr. Dubey
*str points to the first character of the string, which is 'H'.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
97
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
89%
Success Rate