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 31 of 39

Q301.
What is the output of this program?
#include <stdio.h>
int test() 
{
  static int n = 10;
  return n--;
}
 
int main()
{
  for(test(); test(); test())
    printf("%d ", test());
  return 0;
}
Discuss
Answer: (b).8 5 2
Q302.
What is the output of this program?
int main()
{
  void test(), temp();
  temp();
}
void test()
{
  printf("2 ");
}
void temp()
{
  printf("1 ");
  test();
}
Discuss
Answer: (a).1 0
Q303.
What is the output of this program?
#include <stdio.h>
void main()
    {
        test();
        void test()
        {
            printf("1");
        }
    }
Discuss
Answer: (b).Compilation Error
Q304.
How many type of conversion are there in C?

a.

1

b.

2

c.

3

d.

4

Discuss
Answer: (b).2
Q305.
Which conversion also called Automatic Type Conversion?
Discuss
Answer: (a).Implicit Type Conversion
Q306.
The following code is an example of
double da = 4.5;
double db = 4.6;
double dc = 4.9;

//explicitly defined by user
int result = (int)da + (int)db + (int)dc; 

printf(""result = %d"", result);
Discuss
Answer: (b).Explicit Type Conversion
Q307.
What will be output for the following code?
#include<stdio.h> 
int main() 
{ 
    int x = 10;    
    char y = 'a'; 
    x = x + y; 
     
    float z = x + 1.0; 
  
    printf(""x = %d, z = %f"", x, z); 
    return 0; 
}
Discuss
Answer: (c).x = 107, z = 108.000000
Q308.
What will be output for the following code?
#include<stdio.h> 
int main() 
{ 
    double x = 1.2; 
    int sum = (int)x + 1; 
  
    printf(""sum = %d"", sum); 
  
    return 0; 
}
Discuss
Answer: (a).sum = 2
Q309.
In Implicit type conversion, If an operand of long int is present then the other operand will be converted to
Discuss
Answer: (d).long int
Q310.
In Implicit type conversion, If an operand of type long double is present in the expression, then the corresponding operand will also be converted to
Discuss
Answer: (b).long double

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!