Skip to main content

Posts

Showing posts from January, 2019

History of C

     History of C C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis M. Ritchie at the Bell Telephone Laboratories to develop the UNIX operating system. C is the most widely used computer language. It keeps fluctuating at number one scale of popularity along with Java programming language, which is also equally popular and most widely used among modern software programmers. C is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX operating system at Bell Labs. C was originally first implemented on the DEC PDP-11 computer in 1972. In 1978, Brian Kernighan and Dennis Ritchie produced the first publicly available description of C, now known as the K&R standard. The UNIX operating system, the C compiler, and essentially all UNIX application programs have been written in C. C has now become a widely used professional language for various reasons −   • Easy to learn

IMPORTANCE OF C

IMPORTANCE OF C The increasing popularity of C is probably due to its many desirable qualities. It is a robust language whose rich set of built-in functions and operators can be used to write any complex program. The C compiler combines the capabilities of an assembly language with the features of a high-level language and therefore it is well suited for writing both system software and business packages. In fact, many of the C compilers available in the market are written in C.     Programs written in C are eficient and fast. This is due to its variety of data types and powerful operators. It is many times faster than BASIC. For example, a program to increment a variable from O to 15000 takes about one second in C while it takes more than 50 seconds in an interpreter BASIC.     There are only 32 keywords in ANSI C and its strength lies in its built-in functions. Several standard functions are available which can be used for developing program    C is highly portable. This mea

Why use C?

Why use C? C was initially used for system development work, particularly the programs that make-up the operating system. C was adopted as a system development language because it produces code that runs nearly as fast as the code written in assembly language. Some examples of the use of C might be − • Operating Systems • Language Compilers • Assemblers • Text Editors • Print Spoolers • Network Drivers • Modern Programs • Databases • Language Interpreters • Utilities

Facts about C

Facts about C   • C was invented to write an operating    system called UNIX.   • C is a successor of B language which  was introduced around the early 1970s.   • The language was formalized in 1988  by the American National Standard  Institute (ANSI).   • The UNIX OS was totally written in C.   • Today C is the most widely used and  popular System Programming Language.   • Most of the state-of-the-art software  have been implemented using C.   • Today's most popular Linux OS and RDBMS MySQL have been written in C.    

Syntax/Format of C program

C Programs A C program can vary from 3 lines to millions of lines and it should be written into one or more text files with extension ".c"; for example, hello.c. You can use "vi", "vim" or any other text editor to write your C program into a file. Before we study the basic building blocks of the C programming language, let us look at a bare minimum C program structure so that we can take it as a reference in the upcoming chapters.     Syntax/Format of simple C program main ()  <--------------------- Function name  {  <------------------------------ Start of program         ........         ........  <------------------- Program statement         ........  }  <------------------------------ End of program      Hello World Example A C program basically consists of the following parts − • Preprocessor Commands • Functions • Variables • Statements & Expressions • Comments Let us look at a simple code that would prin