ACtE03 · Chapter 3Programming & Applications🏛️ Past Licensure QuestionID: 56e74db6
In the standard C library, the string I/O functions gets() and puts() are declared in:
In the standard C library, the string I/O functions gets() and puts() are declared in:
Multiple Choice Options
- A
conio.h
- B
string.h
- C✓ Correct Option
stdio.h
- D
stdlib.h
Detailed Technical Solution & Explanation
Both gets() and puts() are stream I/O functions and are declared in <stdio.h>. (Note: gets() was deprecated in C99 and removed in C11 due to buffer overflow risks, replaced by fgets()).
Option Analysis:
•
Option A (conio.h): Non-standard header for console I/O (e.g.,
getch()).•
Option B (string.h): Contains string manipulation functions like
strlen(), strcpy(), strcmp().•
Option C (stdio.h): Correct. Header for standard input/output functions including
gets() and puts().•
Option D (stdlib.h): Contains memory allocation and utility functions (
malloc, free, exit).Reference: Mock Test 05NEC Licensure Syllabus