Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prepared By: G.UshaRani B.Pranalini A.S.Lalitha

Similar presentations


Presentation on theme: "Prepared By: G.UshaRani B.Pranalini A.S.Lalitha"— Presentation transcript:

1 Prepared By: G.UshaRani B.Pranalini A.S.Lalitha
OVERVIEW OF C LANGUAGE Prepared By: G.UshaRani B.Pranalini A.S.Lalitha

2 CONTENTS INTRODUCTION CHARACTERSTICS STRUCTURE OF PROGRAM DATA TYPE
IF ELSE SWITCH CASE LOOPING ARRAY POINTER STRUCTURE FUNCTION

3 INTRODUCTION C language is one of the most popular computer language today because it is a structured ,low level ,machine dependent language It is developed by DENNIS RITCHIE in between 1969 and 1973 at bell labs.

4 CHARECTERISTICS There are a small, fixed number of keywords, including a full set of flow of control primitives : for, while, if, do while and switch. More than one assignment may be performed in a single statement. There are a large number of arithmetical and logical operators, such as +, +=, ++, &, ~, etc.

5 STRUCTURE OF PROGRAM Documentation Section Link section
Defining section Global declaration section Main function section { Declaration part Executable part. } //optional //Must

6 Sub program section //optional Function 1 Function 2 Function n

7 WHAT IS DATA TYPE ? A data type in a programming language is a set of data values having predefine characteristics. there are three classes of data types: Data Type Primitive derived user define

8 TYPES OF DATA TYPE In c language compiler support five fundamental data type namely integer (int), character(char), floating point(float),double and void. Derived data types are array, structure, pointer, function. A user define data type is basically made by the user itself.

9 IF ELSE STATEMENT The if statement is a powerful decision making statement . If ....else statement is a extention of the simple if statement . The general form is : if(test expression) { true-block statement(s) } else false –block statement(s) n

10 SWITCH CASE It is a control statement that provides a facility for multiway branching from a particular point. syntax: switch(expression) { case labels: break; }

11 LOOPING LOOP For loop While loop Do while loop
To execute a set of instructions repeatedly until a particular condition is being satisfied. LOOP For loop While loop Do while loop

12 Syntax of loops For loop-
For(intialization ; test condition ; increment) { Body of the loop } While loop- While(test condition) { Body of the loop } Do while loop- do { body of the loop }

13 ARRAY arrayname[size]; Type of array data type Multi-dimensional
An array is a collection of elements of the same data type. Syntax : arrayname[size]; Type of array data type Multi-dimensional 1 dimensional 2 dimensional

14 POINTER C allow us to store the address of one variable in another variable. Syntax: data type *ptrname; STRUCTURE Binding of different type of data member in a single entity. struct structurename different datatype }; Syntax: {

15 FUNCTION A function definition specifies the name of the function, the types and number of parameters it expects to receive, and its return type. Types of functions Built in function User define function

16


Download ppt "Prepared By: G.UshaRani B.Pranalini A.S.Lalitha"

Similar presentations


Ads by Google