Download presentation
Presentation is loading. Please wait.
Published byDerick Porter Modified over 9 years ago
1
‘C’ LANGUAGE PRESENTATION
2
C language was introduced by Dennis Ritchie.. It is a programming language, which can make a interaction between user and a machine.. It is a basic programming language & it is recognized as a high level language.. It was developed as a software development programming language in ‘AT&T Bell’ labs in between 1969 & 1973..
3
Program means nothing but doing a task at a time at a particular place.. We need three steps to construct a program.. In C language we construct a program which consists of input, procedure& output..
4
Firstly to construct a program we have to decide an exact output.. Then as a next step, we have to give an Input according to the Output.. Now next to the procedure.. Now the required Output will be displayed in EXE file by compiling..
5
Compile :- Machine does not understand the common language which is entered in the program.. Compiler translates the source code (used in the program) to binary code( Machine code).. It checks and displays whether the program contains any errors..
6
After compiling the program, run is necessary.. If there are no errors, then we can run the program.. By running, the program can be executed.. Then the written program’s output can be displayed in EXE file..
7
Function is nothing but ‘Working’.. Functions to a program is just like bricks to construct a wall.. Function in C is defined as a set of related statements.. Every function can perform its particular task.. Printf(); scanf(); getch() ect are some functions used in a program….
8
In C language we have one basic condition.. Every function will be executed by other function.. Main function is defined as “Over all executable function.”.. So it could be mentioned in between header files and procedure..
9
These are placed at the top of the program.. Header files contains the perfect definitions of functions.. In C, the program always executes from top to bottom.. It is difficult to mention these files above every function, so these files are placed at the top of the program..
10
In C language we can use loops to repeatedly execute the same procedure.. There are different kinds of loops in C.. For, while, do-while are the 3 loops used in C program.. A loop begins with a open brace bracket ‘{‘ and ends with closed brace bracket ‘}’..
11
For loop contains three indexes.. First one is for initialization.. Second one is for limiting.. Third one is for increment or decrement.. The given procedure in For loop is can be executed up to the limit which has mentioned in second index..
12
While is used to repeat the procedure as For loop.. In while loop we need to mention one condition to repeat a procedure.. The program will be executed up to the mentioned condition is not to be satisfied..
13
In while loop the procedure will be stopped, when the condition doesn’t satisfy.. In this loop, the procedure will be executed even for a single time though the given condition is not true..
14
Primary data types could be of three varieties.. They are Characters, Integers and Floats.. They can derive many data types from these three types.. They can hold elements and keep those onto the location called Memory Blocks.. Data types have some capacity to hold those elements.. Every memory block have it’s particular location..
15
A Character could be an Unsigned Char or a Signed Char.. The range of characters is from -127 to +128.. A Signed char can have the range as same as the Ordinary char.. An Unsigned char has a range from 0 to 255..
16
The range of an Integer constant depends upon the compiler.. For a 16 bit compiler like Turbo C or Turbo C++ the range is -32768 to +32767.. An int could be a short Int or a long Int.. Shorts are never bigger than ints.. Ints are never bigger than Longs..
17
They can allow float values.. A float occupies 4 bytes in memory.. It’s range from -3.4e38 to +3.4e38.. If this is insufficient, then C offers a Double data type that occupies 8 bytes in memory and has a range from -1.7e308 to +1.7e308..
18
Array is defined as collection of elements of same data type.. We can enter the number of elements of similar type onto one memory block by making some partitions, just like partitions of various rooms in a home.. First we need to decide the size of memory block and then we can enter those elements..
19
When we use array for construct a program, firstly we need to decide the size of it.. After that we can not change it’s size while we runs the program.. Suppose, if the number of elements is less than the number of partitions of an array, then the remaining partitions can be wasted.. If the number of elements is greater than the size of an array then it will be collapsed..
20
Structure is defined as the group of various data types.. We can make a group of various data types and we can give one name to that structure.. It can be useful when the data could be stored about various things or about various purposes..
21
By U.Susmitha Haritha Patil& K.Samatha.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.