Chapter-13(Functions in C)
1
|
A
type of functions written by the programmer is known as:
| |||
User defined
|
Subprograms
|
Sub functions
|
Built in functions
|
|
2
|
Local
variables are also called:
|
|||
Automatic
|
Normal
|
Global
|
None
|
|
3
|
A
variable declaration outside any function is known as:
|
|||
Global variable
|
Local variable
|
External variable
|
Static
|
|
4
|
The
scope of a variable refers to its:
|
|||
Length
|
Name
|
Accessibility
|
Data type
|
|
5
|
The
parameters in function declaration are called:
|
|||
Formal parameters
|
Actual parameters
|
Both A and B
|
None
|
|
6
|
What
is the variable name that is used by a function to receive passed values?
|
|||
Function
|
Parameter
|
Expression
|
Constant
|
|
7
|
The
first line of function definition is known as:
|
|||
Function header
|
Function output
|
Invoking a function
|
None
|
|
8
|
The
process of sending an argument to a function is called:
|
|||
Sending
|
Filtering
|
Delivering
|
Passing
|
|
9
|
In
a C program, two functions can have:
|
|||
Same name
|
Same parameters
|
Same name and same parameters
|
Same name but different parameters
|
|
10
|
Function
declaration consists of:
|
|||
Function name
|
Function return type
|
Number and types of parameters
|
All
|
|
11
|
A
built in function:
|
|||
Can’t be redefine
|
Can be redefine
|
Can’t be return a value
|
Can be return a value
|
|
12
|
The
name of actual and formal parameters:
|
|||
May or may not be same
|
Must be same
|
Must be different
|
Must be in lower case
|
|
13
|
Memory
is allocated to a local variable at the time of its:
|
|||
Declaration
|
Destruction
|
Definition
|
First reference
|
|
14
|
Global
variables are created in:
|
|||
RAM
|
ROM
|
Hard Disk
|
Cache
|
Q-2: Write short answers
i.
Define
global variable.
ii.
Compare
local and global variable.
iii.
Define
local variable.
iv.
State
the use of formal parameters.
v.
How
does a function return value?
vi.
How
does a function return value?
vii.
What
is function call?
viii.
What
is function definition?
ix.
Define
function body.
x.
Define
function header.
xi.
Describe
built in function.
xii.
How
does a function make programming easier?
Q-3:
Write detail answers
·
Briefly
explain the benefits of using functions.
·
Write
a program that inputs a number in main function and passes the number to a
function. The function displays table of that number.