Hello dear readers , Today is our first tutorial of ‘C’ language for beginners.I hope you will be happy to learn from it and share this also with your friends.My all the concepts of C are and very precise and on the Topic If you are Learning C from a scratch then it will be a right place for you.Before starting C language we will learn about the history of C language in computer science.You need to read the below topic thoroughly to understand what is C.
- 1 History of ‘C’ Language
- 2 Development of ‘C’
- 3 Basic Structure of ‘C’ language
- 4 Comments can be placed any where in program and are inclosed between the (/* */)comments are generally used for documentation purpose .we cannot nested comments.
- 4.0.1 C program is divided into modules or functions.some functions are written by users and many are stored in library function.Library function.Library Function are grouped in category wise and stored in different files know as Header files.
- 4.0.2 If we want to access the functions stored in the Library,it is necessary to tell the compiler about the files to be accessed .
- 4.0.3 This is achieved by using the Preprocessor directive#include<> as following.
- 5 Preprocessor directive is placed at the beginning of the program.
- 6 =>Global variables
- 7 There are some variables that are used in more that one functions.Such variables are called Global variables and re declared in the global declaration section.
- 8 =>Main funtion
- 9 The main function is the part of every C program C permits different form of main statement Following are allowed.
- 10 1.main()
- 11 2.int main()
- 12 3.main(void)
- 13 4.void main(void)
- 14 5.int main(void)
- 15 =>Executing a ‘C’ Program
- 16 1.Creating the program.
- 17 2.Compiling the program(checking for errors)
- 18 3.Linking the programs with funtion that are needed from the ‘C’ library.
- 19 4.Executing the program.
- 21 Next chapter—->
History of ‘C’ Language
‘C’ is a programming language developed at “At&T Bell lab” of U.S.A in “1972” is was designed and written by “DENNIS RITCHIE” . ‘C’ seems to be so popular as it is reliable,simple and easy to use.
Development of ‘C’
1960 Algol Developed by international group
1967 BCPL Developed by Martin Richard
1970 B Developed by Ken Thompson
1972 traditional C Developed by Denis Ritchie
Reasons for using ‘C’ language over other Languages/Importance of C
- Nobody can Directly learn writing code Higher level language such as C++,C#(C Sharpe),JAVA etc.These languages make use of object oriented languages programming (OPP’s)to organise programs.
- Programs written in C language are efficient and fast .C is highly portable this means that C programs written for one computer can be run on another computer with little or no modifications.
- In ‘C’ many standard functions are available which can be used for developing programs.
Basic Structure of ‘C’ language
- ‘C’ Programs is collections of one or more functions .Every function is a collection of statements and perform some specific task.
The general structure of ‘C’ programs is:-
- Preprocessor Directives
- Global Variables
- Main() Funtions
=> Firstly we will discuss about comments:-
Comments can be placed any where in program and are inclosed between the (/* */)comments are generally used for documentation purpose .we cannot nested comments.