Home Tuitions

Chapter-Standard Library Functions

Important MCQ questions for Class 11 Computer Science Chapter-Standard Library Functions

Get Important MCQ questions for Class 11 Computer Science Chapter-Standard Library Functions with a detailed explanation of all the MCQ questions asked from Chapter-Standard Library Functions prepared by the experts. 

Get Selected MCQ-based questions with solutions for Chapter-Standard Library Functions

MCQ Questions set-1 for chapter-Standard Library Functions class 11 Computer Science 

Computer Science - MCQ on Standard Library Functions

Class XI

Q.1. In C++, ## is used to

a. perform token replacement.

b. perform preprocessor operations.

c. include two header files at the same time.

d. include a library function.

Answer:

(a)

Explanation: # is used for preprocessor directives and ## is used to perform token replacement and merging, during the preprocessor scanning phase.

Q.2. In our human body, we have brain, that stores all the functions to be performed by our body. For C++ these functions are stored in

a. header files.

b. library functions.

c. iostream.

d. main().

Answer:

(a)

Explanation: A header file is a file containing C declarations and macro definitions to be shared between several source files. They supply the definitions and declarations required to invoke system calls and libraries.

Q.3. Every function in C++ has its code

a. within square brackets.

b. within angular bracket.

c. within curly braces.

d. no bracket used etc.

Answer:

(b)

Explanation: Every function in C++ has its code within curly braces. {}

Q. 4. Manipulators used in C++ are

a. setw, setiosflags, setfill, setprecision.

b. cout, cin.

c. ‘\n’.

d. setw, endl and scope resolution operator.

Answer:

(a)

Explanation: setw, setiosflags, setfill, setprecision, endl are manipulators.

Manipulators are used to change formatting parameters on streams, and to insert or extract certain special characters.