Smart Guess & Test Papers
Student Name ______________________ Father Name ______________________ Roll Number _______
Class: 2nd /Year - Computer Science New Marks : 64 Exam Format : Chapter Wise MCQs
Time : notespk.com_Nauman Sadaf | Date _________________ Examiner Sig __________ Chapter#: 13
MCQ's S/Q L/Q Total
Objective Type
1. Encircle the Correct Option. (1 x 44 = 44)
1) Following perform tasks that may need to be repeated many times.
a) Condition b) Module c) Program d) Function
2) In C Language , first line of the function definition is known as .
a) Function header b) Arguments c) Function body d) Parameters
3) In the whole logic of program is contained in main function , it is called .
a) Structured programming b) Object oriented c) Un-structures programming d) Modular programming
programming
4) Which of the following is the advantage of function ?
a) Easy to write program b) Reusability c) Eliminate duplicate d) All of these
5) Another name for predefined functions is .
a) User defined b) Custom built c) Built in d) Modal
6) Built in functions make our task.
a) Complex b) Length c) Simple and easy d) Technical
7) Another name of built in function is .
a) Library function b) Arithmetic function c) User defined function d) All of these
8) The predefined functions that are part of C language are called .
a) User defined b) Subprograms c) Subroutines d) Built- in functions
9) A type of function is written by the programmer is known as .
a) User - defined b) Subprograms c) Subroutines d) Built - in - function
10) A built - in function .
a) Cannot be redefined b) Cannot return a value c) Can be redefined d) Should be redefined
11) The parameters specified in the function header are called .
a) Formal parameters b) Default parameters c) Actual parameters d) Original parameters
12) A block of code is surrounded by .
a) ( ) b) [ ] c) { } d) " "
13) A function that does not return any thing has return type .
a) Nothing b) Float c) Void d) Null
14) The actual body of the function is defined in .
a) Function declaration b) Function definition c) Function call d) Function header
15) Following term of a function describes the number and type of its arguments and the return type of the function .
a) Size b) Name c) Header d) Type
16) The first line of function definition is known as .
a) Function body b) Function call c) Function header d) Function argument
17) What is true about a function prototype ?
a) It is also referred to as b) It is terminated with a c) It is a single statement d) All of these
function declaration semicolon ( ; )
18) Function declaration consists of
a) Function name b) Function return type c) Number and types of d) All of these
parameters
19) A function
a) May return more than one b) Cannot return any value c) May return only one value d) May return two values
values
20) The actual values are passed to the function in .
a) Function declaration b) Function definition c) Function call d) Called function body
21) A function is called with help of its .
a) Name b) Parameter c) Definition d) Return value
22) The statement that activates a function is called .
a) Function call b) Function output c) Invoking a function d) Function input
23) Which of the following looks for the prototype of functions , when a function is called .
a) Linker b) Loader c) Compiler d) Parser
24) Actual argument are used in .
a) Function declaration b) Functioncall c) Function prototype d) Function definition
25) The scope of a variable refers to its .
a) Length b) Name c) Accessibility d) Data type
26) The region of a program in which a variable is accessible is called .
a) Area b) Scope c) Function d) Use
27) Local variable are also called .
a) Automatic variable b) Register variable c) Static variable d) Run time variable
28) The variables declared inside any function are known as .
a) Global variables b) External variables c) Private variables d) Local variables
29) Memory is allocated to a local variable at the time of its .
a) Declaration b) Destruction c) Definition d) First reference
30) Data can be shared between functions using .
a) Local variable b) Static variable c) Global variable d) Register variable
31) The variables that are declared outside all blocks are called .
a) General variables b) Global variables c) Local variables d) Global data items
32) Global variable are crated in .
a) RAM b) ROM c) Hard disk d) Cache
33) Which of the following type of variables are destroyed when the program is terminated .
a) Register variables b) Automatic variables c) Local variables d) Global variables
34) Function prototypes for built-in functions are specified in .
a) Source files b) Header file c) Object file d) Image file
35) Global variables are created in .
a) RAM b) ROM c) Hard disk d) Cache
36) While of the following statement is true about a function call ?
a) Stops the execution of the b) Transfers control to the c) Transfers control to the d) Resumes the execution of
program main function called function the program
37) Which of the following looks for the prototypes of functions used in a program ?
a) Linker b) Loader c) Compiler d) Parser
38) Memory is allocated to a local variable at the time of its .
a) Declaration b) Destruction c) Definition d) First reference
39) The name of actual and formal parameters .
a) May or may not be same b) Must be different c) Must be same d) Must be in lowercase
40) Formal arguments are also called .
a) Actual arguments b) Original arguments c) Dummy arguments d) Referenced arguments
41) printf () is a .
a) Built-in function b) User-defined function c) Local function d) Keyword
42) A built-in function .
a) Cannot be redefined b) Cannot return a value c) Can be redufined d) Should be redefined
43) In a C program , two functions can have .
a) Same name b) Same name and same c) Same parameters d) Same name but different
parameters parameters
44) The process of sending an argument to a function is called.
a) Sending b) Filtering c) Delivering d) Passing
2. Write "T" for a true statement and "F" for a false statement (1 x 10 = 10)
45) In C , arguments can be passed to a function only by value .
☐ True ☐ False
46) There can be multiple main functions in a C program .
☐ True ☐ False
47) A function can be called anywhere in the program .
☐ True ☐ False
48) In C , every function must return a value .
☐ True ☐ False
49) A user-defined function cannot be called in another user-defined function.
☐ True ☐ False
50) A function can be called only once in a program .
☐ True ☐ False
51) Scope of a local variable is the block in which it is defined .
☐ True ☐ False
52) Global variables exist in memory till the execution of the program .
☐ True ☐ False
53) An unstructured program is more difficult to debug than a structured program .
☐ True ☐ False
54) Function body is an optional part of the function .
☐ True ☐ False
3. Fill in the blanks. (1 x 10 = 10)
55) A _________ is a self-contained piece of code .
56) Pre - defined functions are packaged in ___________ .
57) A ______ provide basic information about the function to the compiler .
58) The duration for which a variable exists in memory is called its ____________
59) __________ of a variable refers to the region of the program where it can be referenced .
60) _________ variables are declared outside all blocks .
61) A function cannot return more than ________ value (s) through return statement .
62) The parameters specified in the function header are called _________ parameter .
63) The parameters passed to a function in the function call are called _______ parameters .
64) Functions help to achieve __________ programming .