MCQ Practice Single Best Answer Topic: Structure in C Language

Q What is the output of this C code?

    #include <stdio.h>
    struct student
    {
        char *name;
    };
    void main()
    {
        struct student s, m;
        s.name = "st";
        m = s;
        printf("%s%s", s.name, m.name);
    }

Question ID
#2632
Subchapter
Structure in C Language
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A Compile time error
  • B Nothing
  • C Junk values
  • D st st
Correct Answer: D

Explanation

None

Share This Question

Share this MCQ with your friends or study group.