Summary

  • A C program consists of one or more modules called functions. One of these functions must be called main() which identities the starting point of a C program.
  • Many functions like printf(), scanf() are supplied in a standard library of functions provided with each C compiler.
  • All C statements must be terminated by a semicolon.
  • A typical C program has the following format.
#include <stdio.h> 
int main()
{ 
     Declaration statements;
     Other statements;
}
  • Declaration statement is also called definition statement when a variable declaration causes the computer to set aside memory locations for the variable.
  • The basic datatypes recognized by C are integer, floating point, double precision and character data.
  • C language supports different operators such as arithmetic, assignment, relational, increment and decrement, Bit and logical or Boolean .
  • Each compiled C program is automatically passed through a preprocessor. Lines beginning with # in the first column are recognised as commands to this preprocessor. Preprocessor commands are not terminated with a semicolon. 

Review Questions

  1. The list below gives some algebraic expressions aid incorrect C expressions corresponding to them. Point out the errors.

    Algebra C Expression
    (1)(6) + (4)(5) (1)(6) + (4)(5)
    (3.2) 8.7+ 6.2   (3.2) 8.7+ 6.2
  2. Explain about the C VOID functions.
  3. What are the arithmetic operators available in C?
  4. Give a brief account on implicit and explicit type conversions.
  5. Explain about the C data types.