Font size
WorksheetsFunctions on C
Total questions: 15
Worksheet time: 17mins
main()
{
printf("%p",main);
}
Error
Will make an infinite loop
Some address will be printed
None of the above
main()
{
int i = abc(10);
printf("%d",--i);
}
int abc(int i)
{
return(i++);
}
10
9
11
None of the above
In C , parameters are always
Passed by value
Passed by reference
Non-pointer variables are passed by value and pointers are passed by reference
Passed by value result
Select the correct statements
The body of a function should have only one return statement.
The body of the function may have many return statements.
A function can return only one value to the calling environment
If return statement is omitted,then the function does it's job but returns no value to the calling environment.
Which of the following is a complete function?
int function()
int function(int x){
return x=x+1;
}
void function(int){printf("Hello");}
void function(x){printf("Hello");}
None of these
int f (int x)
{
if(x<=4)
return x;
return f(--x);
}
void main()
{
printf("%d", f(7));
}
4 5 6 7
1 2 3 4
4
Syntax error
Runtime error
The function scanf returns
The actual values read for each argument.
1
0
The number of successful read input values.
ASCII value of the input read.
Which of the following functions calculates the square of 'x' in C
sqr(x)
pow(2,x)
pow(x,2)
power(2,x)
power(x,2)
A function which calls itself is called as
Self Function
Auto Function
Recursive Function
Static Function
Choose correct statements about C language Pass By Value
Pass By Value copies the variables value in one or more memory location.
Pass By Value doesn't use pointers.
Pass By Value protects your source or original variables from changes in outside functions or called functions
All the above
What is the limit for number of functions in a C Programming?
16
64
32
No limit
What characters are allowed in a C function name identifier?
Alphabets, Numbers,%,$,_
Alphabets, Numbers,Underscore(_)
Alphabets, Numbers,$
Alphabets, Numbers,%
Arguments passed to a function in C Language are called ____ arguments
Formal arguments
Actual arguments
Definite argument
Ideal arguments
Arguments received by a function in C language are called ___ arguments
Definite argument
Actual arguments
Formal arguments
Ideal arguments
Select correct options about C language function arguments
Number of arguments should be same when sending and receiving
Type of each argument should match exactly
Order of each argument should be same
All of the above
