Multiple Choice 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 11 views
Question Info
#24921Q ID
ModerateDifficulty
SEMESTER – I - COMS - Unit – 3: Section 4: Introduction to C: Arrays and StructureTopic

Select All That Apply

Tick every correct option, then press Check Answer.

  • A 7
  • B 9
  • D Error
Correct Answer

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.