Home | Solved Mcqs | 13th Chapter Solved Exercise MCQs Of ICS Second Year Computer Science

13th Chapter Solved Exercise MCQs Of ICS Second Year Computer Science

September 23, 2024

13th Chapter Solved Exercise MCQs Of ICS Second Year Computer Science. Each question includes the correct answer and a brief explanation. It’s designed to help you study, prepare for exams, and understand key concepts better. Boost your Computer Science knowledge with these practice exercises.

13th chapter solved MCQs with explanation

1. Function prototypes for built-in functions are specified in:
a) object files
b) header files
c) source files
d) image files

Explanation: Function prototypes for built-in functions are stored in header files, which provide declarations for standard library functions.

2. Global variables are created in:
a) RAM
b) ROM
c) hard disk
d) cache

Explanation: Global variables are stored in RAM (Random Access Memory), where they remain throughout the program’s execution.

3. Which of the following is true about a function call?
a) Stops the execution of the program
b) Transfers control to the called function
c) Transfers control to the main function
d) Resumes the execution of the program

Explanation: When a function is called, the control of the program shifts to that function, where the code inside it is executed.

4. Which of the following looks for the prototypes of functions used in a program?
a) linker
b) loader
c) compiler
d) parser

Explanation: The compiler checks for function prototypes to ensure that functions are declared and used correctly.

5. Memory is allocated to a local variable at the time of its:
a) definition
b) destruction
c) declaration
d) first reference

Explanation: Memory for a local variable is allocated when it is declared within a function.

6. The name of actual and formal parameters:
a) must be same
b) may or may not be same
c) must be in lowercase
d) must be different

Explanation: The names of actual and formal parameters can be the same or different; what matters is the order and type.

7. Formal arguments are also called:
a) actual arguments
b) dummy arguments
c) original arguments
d) referenced arguments

Explanation: Formal arguments are sometimes referred to as dummy arguments because they act as placeholders in function definitions.

8. printf() is a:
a) built-in function
b) user-defined function
c) local function
d) keyword

Explanation: printf() is a standard built-in function in C used to print formatted output to the screen.

9. A built-in function:
a) cannot be redefined
b) can be redefined
c) should be redefined
d) cannot return a value

Explanation: Built-in functions cannot be redefined in a program because they are part of the standard library.

10. In a C program, two functions can have:
a) same name
b) same parameters
c) same name and same parameters
d) same name but different parameters

Explanation: In C, two functions can share the same name if their parameters are different, a concept known as function overloading.