introduction to c programming language

23
An Introduction to C Programming Language

Upload: sanjay-joshi

Post on 16-Jan-2017

170 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Introduction to c programming language

An Introduction to C Programming Language

Page 2: Introduction to c programming language

Intro

C is the famous programming language designed to develop system application program.

Page 3: Introduction to c programming language

IntroIt is known as the starting of

every programming language all the basics of a program language starts from C language.

C is known as general purpose procedural programming language.

Page 4: Introduction to c programming language

HistoryDeveloped by M. Dennis

Ritchie at the Bell laboratories in the year of 1972.

C is known as high level language because it has the power of a lower level language and easy syntax like high level language.

Page 5: Introduction to c programming language

Why C used as a professional programming language?

Easy to learnIt’s a structured programming

language

Page 6: Introduction to c programming language

Why C used as a professional programming language?

Can handle low level programsCompiled code can be used in

different computers

Page 7: Introduction to c programming language

Features of C

C is a robust languageC is a highly portable language

means once compiled; the code can be run in any computer.

Page 8: Introduction to c programming language

What is Compiler?

Compiler is a computer program that transforms the human written language into machine level language.

Page 9: Introduction to c programming language

What is Compiler?

In general words computer takes the code written by you and converts it into binary code.

Page 10: Introduction to c programming language

Structure & Syntax of a C Program

#include<stdio.h>#include<conio.h>void Main()clrscr();{Printf(“my first C program”);}

Page 11: Introduction to c programming language

Description of Code:-

#- Prerocessor of program

Include-Include is a keyword

Page 12: Introduction to c programming language

Description of Code:-

Stdio.h-Standard input/output header file

Conio.h-Console input/output header file

Page 13: Introduction to c programming language

Description of Code:-

Void-is a keyword that collects the garbage value

Main()- main() identifies starting of the program execution

Page 14: Introduction to c programming language

Description of Code:-

Clrscr()- To clear the console screen

{, }-Group all statements together

Printf()-It is a function to print the output on screen.

Page 15: Introduction to c programming language

C Data types

Data type of C language mostly divided into 5 major types

int, char, float, double, void

Page 16: Introduction to c programming language

C Data types

int char float

void double

Page 17: Introduction to c programming language

C Data types

Int –Used to identify an integer valueChar- Used to identify a characterFloat- Used to identify floating point

typeDouble- Used to identify floating

point typeVoid- denotes to type with garbage

value

Page 18: Introduction to c programming language

Variable:-

Variable is a stored data memory allocated to use it in future and we can change the value too.

Page 19: Introduction to c programming language

Variable:-

Syntax- type variable name;

Ex- int a, b, c;

Page 20: Introduction to c programming language

Explanation of Example

Int-Data type

A, b, c variables

Page 21: Introduction to c programming language

Explanation of Example

Int-Data type

A, b, c variables

;-Identifies the end of statement.

Page 22: Introduction to c programming language

End of Slide

This is a simple introduction to C basic that will be elaborated in further classes. If you want to be one of the programming professional then please visit our website for further details about C demo classes and new session.

Page 23: Introduction to c programming language

Thank You