Arithmetic Operators in C

C language provides five main arithmetic operators which include the addition (+), subtraction (-), multiplication (*) and division (/) operator. These operators are used to perform arithmetic operations on numeric values. All these operators perform the function what is signified by their name. In addition there is a modulus operator (%) which gives the remainder … Read more

Operators and Expressions in C

An Operator is a symbol in C language that performs some mathematical, logical, etc. operations on some data. The data items on which operators act upon are called Operands. Some operators require two operands while others require only one operand. A few operators permit only single variable as operand. Operators form Expressions by joining individual … Read more

Storage Classes in C

A storage class defines the scope (visibility) and life time of variables and/or functions within a C Program. These specifiers precede the type that they modify. It is worth mentioning here that the following text should be read again in the context of functions discussed in lesson 13 to better understand it. There are following … Read more

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