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
21. What does calloc() initialize the allocated memory to?
- Garbage value
- Zero
- One
- NULL
22. Which function is used to write formatted output to string?
- printf()
- fprintf()
- sprintf()
- format()
24. Which function searches for a character in a string?
- strstr()
- strchr()
- strfind()
- search()
25. What does realloc() function do?
- Allocate new memory
- Deallocate memory
- Change size of allocated memory
- Initialize memory
26. Which function is used to close a file in C?
- close()
- fclose()
- fileclose()
- endfile()
27. What does the floor() function return?
- Smallest integer >= argument
- Largest integer <= argument
- Rounded value
- Absolute value
28. Which function is used to concatenate two strings?
- strconcat()
- concat()
- strcat()
- strjoin()
29. What is the purpose of fflush() function?
- Clear input buffer
- Flush output buffer
- Fill buffer
- Delete buffer