Unformatted text preview:

HI TECH COMPUTERS C Programming The C Language is developed by Dennis Ritchie for creating system applications that directly interact with the hardware devices such as drivers kernels etc C programming is considered as the base for other programming languages that is why it is known as mother language It can be defined by the following ways Mother language System programming language Procedure oriented programming language Structured programming language Mid level programming language HI TECH 1 C as a mother language C language is considered as the mother language of all the modern programming languages because most of the compilers JVMs Kernels etc are written in C language and most of the programming languages follow C syntax for example C Java C etc It strings functions file handling etc that are being used in many languages like C Java C etc 2 C as a system programming language system A is software C language is a system programming language because it can be used to do low level programming for example driver and kernel It is generally used to create hardware devices OS For example Linux kernel is drivers written in C It can t be used for internet programming like Java Net PHP etc programming provides kernels concepts language create system array core used like etc the the to C LANGUAGE 1 HI TECH COMPUTERS a a of is known subset method language function procedure structured programming 3 C as a procedural language A routine as subroutine etc A procedural language specifies a series of steps for the program to solve the problem A procedural language breaks the program into functions data structures etc C is a procedural language In C variables and function prototypes must be declared before being used 4 C as a structured programming language the A is procedural language Structure means to break a program into parts or blocks so that it may be easy to understand In the C language we break the program into parts using functions It makes the program easier to understand and modify 5 C as a mid level programming language C is considered as a middle level language because it supports the feature of both low level and high level languages C language program is converted into assembly code it supports pointer arithmetic low level but it is machine independent a feature of high level A Low level language is specific to one machine i e machine dependent It is machine dependent fast to run But it is not easy to understand A High Level language is not specific to one machine i e machine independent It is easy to understand HI TECH C Program include stdio h int main printf Hello C Programming n return 0 C LANGUAGE 2 HI TECH COMPUTERS of of to the was Year problems previous overcome Language developed C system was inherits language It developed many to be used in UNIX previous features History of C Language C programming language was developed in 1972 by Dennis Ritchie at bell laboratories of AT T American Telephone Telegraph located in the U S A Dennis Ritchie is known as the founder of the c language It languages such as B BCPL etc Initially operating languages such as B and BCPL Let s see the programming languages that were developed before C language HI TECH Kernighan Dennis Ritchie Standardization Committee International Group Martin Richard ANSI Committee Dennis Ritchie Traditional C ISO Committee Developed By Ken Thompson ANSI ISO C K R C ANSI C Algol 1967 BCPL 1999 1960 1989 1970 1990 1972 1978 C99 B C LANGUAGE 3 HI TECH COMPUTERS Features of C Language C is the widely used language It provides many features that are given below 1 Simple 2 Machine Independent or Portable 3 Mid level programming language 4 structured programming language 5 Rich Library 6 Memory Management 7 Fast Speed 8 Pointers 9 Recursion 10 Extensible HI TECH 1 Simple C is a simple language in the sense that it provides a structured approach to break the problem into parts the rich set of library functions data types etc 2 Machine Independent or Portable Unlike different Therefore C is a machine independent language 3 Mid level programming language Although C is intended to do low level programming It is used to develop system applications such as kernel driver etc It also supports the features of a high level language That is why it is known as mid level language 4 Structured programming language C is a structured programming language in the sense that we can break the program into parts using functions So it is easy to understand and modify Functions also provide code reusability programs can be executed on changes language with c some machines assembly specific machine C LANGUAGE 4 HI TECH COMPUTERS of the lot that make lesser inbuilt inbuilt provides functions 5 Rich Library C a development fast 6 Memory Management It supports the feature of dynamic memory allocation In C language we can free the allocated memory at any time by calling the free function 7 Speed The compilation and execution time of C language is fast since are there functions and hence the lesser overhead 8 Pointer C provides the feature of pointers We can directly interact with the memory by using the pointers We can use pointers for memory structures functions array etc 9 Recursion In C we can call the function within the function It provides Recursion enables us to use the approach of backtracking 10 Extensible C language is extensible because it can easily adopt new features HI TECH First C Program Before starting the abcd of C language you need to learn how to write compile and run the first c program To write the first c program open the C console and write the following code reusability function every code for include stdio h int main printf Hello C Language return 0 C LANGUAGE 5 HI TECH COMPUTERS include stdio h includes the standard input output library functions The printf function is defined in stdio h int main The main function is the entry point of every program in c language printf The printf function is used to print data on the console return 0 The return 0 statement returns execution status to the OS The 0 value is used for successful execution and 1 for unsuccessful execution How to compile and run the c program By menu Now click on the compile menu then compile sub menu to compile the c program Then click on the run menu then run sub menu to run the c program By shortcut Or press ctrl f9 keys compile and run the program directly You will see the following output on user screen c program output You can view the user

View Full Document


Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...

Join to view HI - TECH COMPUTERS and access 3M+ class-specific study document.

We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view HI - TECH COMPUTERS 2 2 and access 3M+ class-specific study document.


By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?