MCQ Single Best Answer Moderate

QOutput?

#include 
struct test {
    int a[2];
};

int main() {
    struct test t = {{7, 9}};
    printf("%d", t.a[1]);
    return 0;
}

ID: #24921 SEMESTER – I - COMS - Unit – 3: Section 4: Introduction to C: Arrays and Structure 4 views
Question Info
#24921Q ID
ModerateDifficulty
SEMESTER – I - COMS - Unit – 3: Section 4: Introduction to C: Arrays and StructureTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A 7
  • B 9
  • D Error
Correct Answer: Option B

Explanation

Structure এর ভিতরে array থাকে।

t.a[0]=7, t.a[1]=9

Output: 9

Share This Question

Challenge a friend or share with your study group.