adplus-dvertising

Welcome to the Functions MCQs Page

Dive deep into the fascinating world of Functions with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Functions, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Functions, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Functions. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Functions. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Functions MCQs | Page 19 of 39

Q181.
Determine output:
main()
{
      int i = abc(10);
      printf("%d", --i);
}

int abc(int i)
{
      return(i++);
}
Discuss
Answer: (b).9
Q182.
The default parameter passing mechanism is
Discuss
Answer: (a).call by value
Q183.
What is the result of compiling and running this code?
main()
{
      char string[] = "Hello World";
      display(string);
}

void display(char *string)
{
      printf("%s", string);
}
Discuss
Answer: (b).Compilation Error
Q184.
Determine output:
main()
{
      int i = 5;
      printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}
Discuss
Answer: (d).45545
Q185.
Pick the correct statements.

I. The body of a function should have only one return statement.
II. The body of a function may have many return statements.
III. A function can return only one value to the calling environment.
IV. If return statement is omitted, then the function does its job but returns no value to the calling environment.
Discuss
Answer: (c).II and III
Q186.
What will be the output of the following program code?
main()
{
      static int var = 5;
      printf("%d ", var--);
      if(var)
            main();
}
Discuss
Answer: (b).5 4 3 2 1
Discuss
Answer: (b).int funct(int x) { return x=x+1; }
Q188.
What will be printed when this program is executed?
int f(int x)
{
   if(x <= 4)
      return x;
   return f(--x);
}
void main()
{
   printf("%d ", f(7)); 
}
Discuss
Answer: (c).4
Q189.
The recursive functions are executed in a ...........
Discuss
Answer: (c).Last In First Out order
Discuss
Answer: (d).The number of successful read input values

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!