MCQ
Single Best Answer
Moderate
QOutput?
#include
struct demo {
int x;
int y;
};
int main() {
struct demo d = {5};
printf("%d %d", d.x, d.y);
return 0;
}
#include
struct demo {
int x;
int y;
};
int main() {
struct demo d = {5};
printf("%d %d", d.x, d.y);
return 0;
}
ID: #24919
SEMESTER – I - COMS - Unit – 3: Section 4: Introduction to C: Arrays and Structure
2 views
Question Info
#24919Q ID
ModerateDifficulty
SEMESTER – I - COMS - Unit – 3: Section 4: Introduction to C: Arrays and StructureTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
Partial initialization হলে বাকি members 0 হয়ে যায়।
d.x = 5, d.y = 0
Output: 5 0
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic