Q. What will be the output of the following C code?

Code:
#include <stdio.h>
typedef struct student
    {
        char *a;
    }stu;
    void main()
    {
        struct student s;
        s.a = ""hey"";
        printf(""%s"", s.a);
    }
  • (A) hey
  • (B) he
  • (C) varies
  • (D) Compile time error
πŸ’¬ Discuss
βœ… Correct Answer: (A) hey

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
230
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
91%
Success Rate