Question
#include <stdio.h>
main()
{
int num=5;
int fun(int num);
printf(""%d"",fun(num));
}
int fun(int num)
{
if(num>0)
return(num+fun(num-2));
}
a.
6
b.
7
c.
8
d.
9
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be output for the following code?
Similar Questions
Discover Related MCQs
Q. Which of the following is true about recursion?
View solution
Q. Choose correct statement about Functions in C Language.
View solution
Q. Choose a correct statement about C Language Functions.
View solution
Q. A function which calls itself is called a ___ function.
View solution
Q. How many values can a C Function return at a time?
View solution
Q. What are types of Functions in C Language.?
View solution
Q. Choose correct statements about C Language Pass By Value.
View solution
Q. What is the limit for number of functions in a C Program?
View solution
Q. Every C Program should contain which function?
View solution
Q. What is the minimum number of functions to be present in a C Program?
View solution
Q. What is the maximum number of statements that can present in a C function?
View solution
Q. What characters are allowed in a C function name identifier?
View solution
Q. Arguments passed to a function inC language are called ___ arguments.
View solution
Q. Arguments received by a function in C language are called ___ arguments.
View solution
Q. Choose a corrects statement about C language function arguments.
View solution
Q. Choose a correct statement with C Functions.
View solution
Q. Choose a non Library C function below.
View solution
Q. What is the default return value of a C function if not specified explicitly?
View solution
Q. What are the data type of variables that can be returned by a C Function?
View solution
Q. A recursive function can be replaced with __ in c language.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!