
Functions in C
Quiz
•
Other
•
Professional Development
•
Medium
Dr. Vinoth
Used 77+ times
FREE Resource
Enhance your content
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What will happen after compiling and running following code?
main( )
{
printf("%p", main);
}
Some address will be printed.
Will make an infinite loop.
Error
None of these.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The keyword used to transfer control from a function back to the calling function is
goto
return
switch
exit
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
hat is the output of this C code?
int main()
{
void foo(), f();
}
void foo()
{printf("2 ");}
void f()
{
printf("1 ");
foo();}
Compile time error due to declaration of functions inside main
B.
C.
D.
1 2
as foo is local to main
2 1
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Choose correct statement about Functions in C Language.
Every Function has a return type
.
Every Function may no may not return a value
A Function is a group of c statements which can be reused any number of times
All the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of C Program with functions.?
void myshow(int);
void main(){
int a=10;
printf("%d ", a);
myshow(a);
printf("%d", a);
}
void myshow(int k){
k=20;
}
10 20
10 10
20 20
Compiler error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following function calculates the square of 'x' in C?
.
sqr(x)
power(2, x)
pow(x, 2)
pow(2, x)
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
It is not advisable to use macros instead of functions because
.
recursion is not possible
no type checking will be done
it increases the code size
All of the above
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple

Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Avaluación inicial M07
Quiz
•
Professional Development
15 questions
SQL Advance Functions MCQs
Quiz
•
Professional Development
15 questions
Ora 07-005
Quiz
•
Professional Development
10 questions
Fullstack Assignment
Quiz
•
Professional Development
8 questions
Arduino 001
Quiz
•
2nd Grade - Professio...
15 questions
AS400 Quiz
Quiz
•
Professional Development
14 questions
Buổi 16 mảng 2 chiều
Quiz
•
Professional Development
10 questions
Basic C language
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade