3 Input And Output

C Programming · Unit 3 · 2 hrs

Input and Output

Exam-focused notes for Input and Output (C Programming, CSC115): what the TU syllabus asks and how it has actually been tested, with 3 solved past questions from this unit.

What this unit covers

  • Conversion specification
  • Reading a character
  • Writing a character
  • I/O operations
  • Formatted I/O

Formatted I/O

20815 marks

Describe different formatted input and output functions. Why do we use them? [4+1]

Formatted input and output means that data is entered and displayed in a particular format. Through format specifications, better presentation of results can be obtained. Formatted I/O functions allow reading and writing data in a structured, human-readable...

Full solved answer →
20785 marks

Explain formatted I/O functions in detail. [5]

Formatted I/O functions are file input/output functions that allow reading and writing of formatted data (data with specific format specifiers like %d, %f, %s, etc.) to and from files. They work in text mode, meaning data is stored as characters and convers...

Full solved answer →

I/O operations

20775 marks

What do you mean by unformatted I/O? Explain. [5]

Unformatted I/O refers to input/output functions in C that read or write data without any format specification. These functions do not require a format string (like %d, %f, etc.) and deal with raw characters or strings directly. They are simpler and faster ...

Full solved answer →