Topic 2, Data I/O Functions slide 3

15 flashcardsby Clement
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What are the two types of I/O functions in C?
Formatted and Unformatted functions
2
Which function is used to write output data to a standard output device in C?
printf
3
What is the syntax of the printf function?
Printf("control/format string", variable1,variable2,...,variable n);
4
Which function is used to enter input data from a standard input device in C?
scanf
5
What does the control or format string in scanf contain?
Certain required formatting information
6
What symbol is used in scanf to indicate the type of the corresponding data item?
%
7
What operator is used in scanf to indicate the memory location of a variable?
& (address of) operator
8
How many types of unformatted I/O functions are there in C?
Three types
9
Which function is used to input single characters in C?
getchar()
10
Which function is used to display single characters in C?
putchar()
11
What functions offer alternatives to scanf and printf for string input and output?
gets and puts
12
What is a disadvantage of the gets() function?
It does not perform any bounds checking, leading to buffer overflows
13
What is a disadvantage of the puts() function?
It lacks formatting options and automatically appends a newline
14
How is a string entered using gets()?
char line[60]; gets(line);
15
How is a string displayed using puts()?
puts(line);
Study all 15 cards for free

More Computer science flashcards

Networking Fundamentals Module 1-7218 cards · 1 addedComputer science · EnglishDiandreiCompTIA Acronyms320 cardsComputer science · EnglishashleighITEC 116: System Integration and ERP98 cardsComputer science · EnglishmackComputer Architecture: Threads and Processes75 cardsComputer science · EnglishbaunieeChapter 3 Key terms62 cardsComputer science · EnglishJaySagemaker Bedrock52 cardsComputer science · EnglishnathanCPEN 247 Final Exam - Gonzaga University43 cardsComputer science · EnglishJoshStructured Query Language (SQL)37 cardsComputer science · English—Griffith—통신, 우편의, 은행 (telecommunication, postal, bank)31 cardsComputer science · Korean모기binary, hex, decimal conversion for cs25 cardsComputer science · Englishgabrielehealth laws20 cardsComputer science · EnglishmichaTime Complexities of Data Structures and Algorithms14 cardsComputer science · Portuguesejohnny

All Computer science decks

Study these decks in the app

Free on iPhone, Android, Mac and the web. Add any deck to your account in one tap.

Download on the App StoreGet it on Google Play
Study all 15 cards for free