Non-Formatted I/O in C

The functions which fall in this category just provide bare bone functionality to read and write a character or string from or to the standard input or output respectively. There are four main functions within this category. gets() gets reads characters from keyboard and stores them as a string into the argument until a newline … Read more

Formatted I/O in C

The functions which fall in this category provide a convenient way to format the input and/or output data as per the requirements. The two main functions within this category are printf() and scanf(). printf() printf() function writes to the standard output (monitor) a sequence of data, formatted as per the format specifier. The general syntax … Read more

Errors in a C program

Error is a condition either during compilation or execution of a program which if not fixed can halt compilation or execution. There are three types of errors — syntax, logical, and run-time errors. Syntax Error These errors occur because of wrongly typed statements, which are not according to the syntax or grammatical rules of the … Read more