Pages

C – Typedef


  • Typedef is a keyword that is used to give a new symbolic name for the existing name in a C program. This is same like defining alias for the commands.
  • Consider the below structure.
struct student
{
         int mark [2];
         char name [10];
         float average;
}

C – Union

C Union is also like structure, i.e. collection of different data types which are grouped together. Each element in a union is called member.

  • Union and structure in C  are same in concepts, except allocating memory for their members.
  • Structure allocates storage space for all its members separately.
  • Whereas, Union allocates one common storage space for all its members

C – Preprocessor directives



C PREPROCESSOR DIRECTIVES:

  • Before a C program is compiled in a compiler, source code is processed by a program called preprocessor. This process is called preprocessing.
  • Commands used in preprocessor are called preprocessor directives and they begin with “#” symbol.

C – File Handling


WHAT IS FILE?

File is a collection of bytes that is stored on secondary storage devices like disk. There are two kinds of files in a system. They are,
  1. Text files (ASCII)
  2. Binary files
  • Text files contain ASCII codes of digits, alphabetic and symbols.
  • Binary file contains collection of bytes (0’s and 1’s). Binary files are compiled version of text files.

C – Programming Basics


If you are looking for C programs, please click here “C programs”.
This C programming basics section explains a simple “Hello World” C program. Also, it covers below basic topics as well, which are to be known by any C programmer before writing a C program.

C – Language History


  • The C programming language is a structure oriented programming language, developed at Bell Laboratories in 1972 by Dennis Ritchie
  • C programming language features were derived from an earlier language called “B” (Basic Combined Programming Language – BCPL)
  • C language was invented for implementing UNIX operating system
  • In 1978, Dennis Ritchie and Brian Kernighan published the first edition “The C Programming Language” and commonly known as K&R C
  • In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or “ANSI C”, was completed late 1988.