Multiple Choice
Moderate
QOutput?
#include
int sum(int a, int b) {
return a + b;
}
int main() {
printf("%d", sum(10, 20));
return 0;
}
#include
int sum(int a, int b) {
return a + b;
}
int main() {
printf("%d", sum(10, 20));
return 0;
}
ID: #24932
SEMESTER – I - COMS - Unit – 3: Section 5: Introduction to C: User defined functions
8 views
Question Info
#24932Q ID
ModerateDifficulty
SEMESTER – I - COMS - Unit – 3: Section 5: Introduction to C: User defined functionsTopic
Your Answer
Select All That Apply
Tick every correct option, then press Check Answer.
Correct Answer
Explanation
এখানে একটি user defined function sum() ব্যবহার করা হয়েছে।
Step Analysis:
- sum(10, 20) → a = 10, b = 20
- return a + b → 30
Output: 30
কেন C সঠিক: function দুটি সংখ্যা যোগ করে return করছে।
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic