thumbnail

The C Standard Library - stdio.h

Based on their return types, parameters and descriptions, can you guess the names of these functions declared in the file "stdio.h" of the standard C library?
Exact spellings required
Answers must correspond to the highlighted box
Quiz by akjlddkjslfsd
Rate:
Last updated: October 14, 2022
You have not attempted this quiz yet.
First submittedOctober 14, 2022
Times taken4
Average score53.3%
Report this quizReport
4:00
Enter function's name here
0
 / 15 guessed
The quiz is paused. You have remaining.
Scoring
You scored / = %
This beats or equals % of test takers also scored 100%
The average score is
Your high score is
Your fastest time is
Keep scrolling down for answers and more stats ...
Type
Parameters
Description
Function
int
int character
Writes the specified character to stdout
putchar()
char *
char *str, int num, FILE *stream
Reads no more than (num - 1) characters from the specified stream and puts them into the string pointed by str; when a newline character is reached, it is put into the string and the reading process terminates
fgets()
int
FILE *stream
Reads a character from the specified file stream and returns it
fgetc()
int
FILE *stream
Same as the above, but may be defined as a macro rather than a function
getc()
long
FILE *stream
Returns the position of the file pointer relative to the start of the file
ftell()
int
const char *format, ...
Writes formatted output, as specified by the format string, to stdout
printf()
int
FILE *stream
Closes the file associated with the specified stream
fclose()
FILE *
(no parameters)
Creates a temporary file whose name is guaranteed to be different from that of any existing file; returns a pointer to that file
tmpfile()
int
FILE *stream
Returns a non-zero value if the end-of-file has been reached for the specified file stream; returns zero otherwise
feof()
int
const char *format, ...
Reads formatted input from stdin
scanf()
int
FILE *stream, const char *format, ...
Writes formatted output, as specified by the format string, to the specified file stream
fprintf()
int
const char *str
Writes the specified string and a newline character to stdout
puts()
int
const char *filename
Deletes the file of the specified name
remove()
int
(no parameters)
Reads a character from stdin and returns it
getchar()
FILE *
const char *filename, const char *mode
Opens a file of the specified name in the specified mode; returns a pointer to that file
fopen()
No comments yet