πŸ“Š C Programming
Q. What is the output of C program?
Code:
int main()
{
    struct ship
    {
        int size;
        char color[10];
    }boat1, boat2;
    boat1.size=10;
    boat2 = boat1;
    printf("boat2=%d",boat2.size);
    return 0;
}
  • (A) boat2=0
  • (B) boat2=-1
  • (C) boat2=10
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) boat2=10

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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