E learning Module for ANSI C

Which of the following are features of the return statement?
|
Choose more than one item.
|
It returns control to the calling function
It is placed only at the end of a function
It can return a value to the calling function
It passes control to the called function
|
1, 3
|
20
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.


@@QUES 030102t MXY Q,0,0,346,358
Which of the following need to correspond with each other?
|
Choose more than one item.
|
The datatype of the return expression and the function
The datatype of the return statement and its assignment in the calling function
The names of the formal and actual parameters
The datatypes of the actual parameters in the calling function
|
1, 2
|
20
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.


@@QUES 030103t SXY Q,0,0,230,320
What is the default return value of a function?
|
Choose an option.
|
%010char
%010int
%010double
%010float
|
2
|
20
|
Correct.
|
Incorrect. The correct option is highlighted.


@@QUES 030104t MXY Q,0,0,261,351
A function prototype consists of which of the following?
|
Choose more than one item.
|
A return type
A return statement
A function name
An argument type
A semicolon
|
1, 3, 4, 5
|
25
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.


@@QUES 030105t SXY Q,0,0,455,363
What happens when the datatype of the return expression and the function header are different?
|
Choose an option.
|
The datatype specified in the function header is converted to agree with the expression
The expression doesn't return any value to the calling function
The datatype of the return expression is converted to agree with the datatype specified in the function header
Both the datatype in the expression and the datatype specified in the function header are converted to datatype int
|
3
|
20
|
Correct.
|
Incorrect. The correct option is highlighted.


@@QUES 030201t MXY Q,0,0,362,330
Which of the following have to correspond to each other when using call by value?
|
Choose more than one item.
|
The datatype of actual and formal parameters
The address of actual and formal parameters
The position of actual and formal parameters
The name of actual and formal parameters
|
1, 3
|
20
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.


@@QUES 030202t SXY Q,0,0,273,260
Which is most suitable for passing aggregate datatypes?
|
Choose an option.
|
Call by value
Call by reference
|
2
|
10
|
Correct.
|
Incorrect. The correct option is highlighted.


@@QUES 030203t MXY Q,0,0,344,355
Which of the following describe the operation of call by reference?
|
Choose more than one item.
|
It copies the address of the formal parameters to the actual parameters
It copies the address of the actual parameters to the formal parameters
It copies the contents of a location in memory
It copies the address of a location in memory
|
2, 4
|
20
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.


@@QUES 030204t MXY Q,0,0,331,324
Which of the following is call by value best suited for exchanging between functions?
|
Choose more than one item.
|
Aggregate datatypes
Numeric constants
Variables
Arrays
|
3, 4
|
20
|
Correct.
|
5
|
Partly right. The correct options are highlighted.
|
You have not made any correct choices. The correct options are highlighted.

Comments

Popular Posts