C- Library Functions MCQ Questions and Answers
C Library Functions MCQ questions with answers focus on standard C functions like printf(), scanf(), strlen(), strcmp(), and malloc(). These programming questions and answers test how well students understand the C Standard Library and its functions. Practicing programming MCQ with explanations is essential for placement exams and programming interviews in companies like Wipro, Cognizant, and TCS. By revising library functions through C programming test practice online, learners can enhance their coding accuracy and logical thinking, ensuring success in both academic exams and technical interviews.
C- Library Functions MCQ
Showing 10 of
29 questions
1. What will the function rewind() do?
- Reposition the file pointer to a character reverse.
- Reposition the file pointer stream to end of file.
- Reposition the file pointer to begining of that line.
- Reposition the file pointer to begining of file.
2. Input/output function prototypes and macros are defined in which header file?
- conio.h
- stdlib.h
- stdio.h
- dos.h
3. Which standard library function will you use to find the last occurance of a character in a string in C?
- strnchar()
- strchar()
- strrchar()
- strrchr()
4. What is stderr ?
- standard error
- standard error types
- standard error streams
- standard error definitions
6. What is the purpose of fflush() function.
- flushes all streams and specified streams.
- flushes only specified stream.
- flushes input/output buffer.
- flushes file buffer.
8. What will the function randomize() do in Turbo C under DOS?
- returns a random number.
- returns a random number generator in the specified range.
- returns a random number generator with a random value based on time.
- return a random number with a given seed value.
9. Which header file should be included to use functions like malloc() and calloc()?
- memory.h
- stdlib.h
- string.h
- dos.h
10. Which library function is used to read a string from standard input in C?
- scanf()
- gets()
- read()
- input()