SlideShare a Scribd company logo
Presented By:
Kirtika Thakur
PROGRAMMING
Presentation on
Topics
Introduction
Control statements
Functions
Arrays
String
INTRODUCTION
 C is a general purpose language which is closely
associated with UNIX for which is developed by Bell
Laborites.
 Most of the program of Unix are written and run with
the help of ‘C’.
 Many of the important idea of ‘C’ stream are form BPCL
by Martin Richard
Cont…
 In, 1972 Dennis Richard at Bell Laborites wrote C
language which cause a revolution in computing world
 From beginning C was intended to be useful for busy
programmers to done easily because C is powerful,
dominate and supple language
Syntax of C Language
#include<stdio.h>
#include<conio.h>
void main()
{
-------
getch();
}
Header File
Main() is function .it is the first function from which the
control statement is passed from os when a program is
executed
Control Statement
Control
Statement
Decision control
Statement
If Else if Nested if
Case control
statement
Switch
Loop control
statement
For loop While loop
Presentation on C language By Kirtika thakur
If-else statement
Definition:
if (condition) { code when true } else
{ code not true }
Example:
if(A>B)
{
printf (“A is greater”);
}
else
{
printf(“B is greater”);
}
If condition is true if statement will executed if not then
else statement is executed
Presentation on C language By Kirtika thakur
Nested if statement
It is always legal in C programming to nest if – else
statements, which means you can use one if or else if
statement.
Syntax:
If (boolan_expression 1)
{
printf(“executed when the expression 1 is true ”);
}
If(boolan_expression 2)
{
printf (“executed when the boolean 2 is true”)
For loop
Presentation on C language By Kirtika thakur
Definition of Function
Function definition include
Function name;
Function type;
Parameter list ;
Declarations of variable;
Function statement;
a return statement ;
All six element are grouped into two parts:
Function header
Function body
Presentation on C language By Kirtika thakur
Function Header
Function body
The function body contain the declaration and statements
necessary for performing the required task .The body
enclosed in braces , contains three parts,
1.local declaration that specify the variable needed by the
function
2. function statement that perform the task of the function.
3. A return statement that return the value evaluated by
the function.
If a function does not return any value , we can omit the
return statement.
Its return type should be specified as void
Example of function
Program for factorial of a number using function
#include<stdio.h>
#include<conio.h>
Void main()
{
Void factorial (int);
Int num;
Printf(“enter the value of num”);
Scanf(“% d,”& num);
Factorial(num);
Getch();
}
Void fun(int x)
{
int product=1, i;
for(i=x; i>=1; i--)
{
product= product*i;
}
Printf(“%d”, product);
}
Array
An array is a fixed-sequential collection of
element that share some data type and a
common name .
It is simple a group of data type.
An array is a derived data type.
An array is used to represent a list of number,
or a list of names.
Array
Single
Dimension
Array
Two
Dimension
Array
Type of Array
String
String are group of arrays also
called character array strings
always ends with null character.
Syntax of string:-
Data Type variable name [ size];
ex:- int a[20];
Presentation on C language By Kirtika thakur

More Related Content

PPTX
C structure
DOCX
Programming Global variable
PPSX
Functions in c
PPTX
Functions
PPTX
Functions
PPTX
Recursive Function
PDF
Unit 3 (1)
C structure
Programming Global variable
Functions in c
Functions
Functions
Recursive Function
Unit 3 (1)

What's hot (20)

PPTX
Tail Recursion in data structure
PPTX
structure of a c program
PPTX
Functions in c
PPTX
functions in C
DOCX
C programming language working with functions 1
PPT
Operators in C Programming
PPTX
Fda unit 1 lec 1
PDF
Pointers and call by value, reference, address in C
PPTX
Evaluation of postfix expression
PPTX
Increment and Decrement operators in C++
PDF
Pointers in C language
PPT
Functions & Procedures [7]
DOCX
C programming Lab 1
PDF
C# programs
PPTX
Functions in c++,
PPT
C FUNCTIONS
PDF
[ITP - Lecture 12] Functions in C/C++
PDF
[ITP - Lecture 07] Comments in C/C++
PDF
VTU PCD Model Question Paper - Programming in C
DOCX
Basic structure of c programming
Tail Recursion in data structure
structure of a c program
Functions in c
functions in C
C programming language working with functions 1
Operators in C Programming
Fda unit 1 lec 1
Pointers and call by value, reference, address in C
Evaluation of postfix expression
Increment and Decrement operators in C++
Pointers in C language
Functions & Procedures [7]
C programming Lab 1
C# programs
Functions in c++,
C FUNCTIONS
[ITP - Lecture 12] Functions in C/C++
[ITP - Lecture 07] Comments in C/C++
VTU PCD Model Question Paper - Programming in C
Basic structure of c programming
Ad

Similar to Presentation on C language By Kirtika thakur (20)

PPTX
C language
PPTX
1 introduction to c program
PPTX
What is c
PPT
C_Language_PS&PC_Notes.ppt
PPTX
Programming in C
PPSX
Esoft Metro Campus - Certificate in c / c++ programming
PPTX
C Programming Unit-2
PPTX
PHP slides
DOC
complete data structure
DOC
Datastructurenotes 100627004340-phpapp01
PPTX
Fundamentals of computer programming by Dr. A. Charan Kumari
PDF
learn basic to advance C Programming Notes
PPTX
C_Progragramming_language_Tutorial_ppt_f.pptx
PPTX
C Language (All Concept)
PPTX
C language
PPTX
c & c++ logic building concepts practice.pptx
PPTX
Programming Fundamentals
PDF
Book management system
PPTX
C programming language tutorial
PPTX
Introduction to C Unit 1
C language
1 introduction to c program
What is c
C_Language_PS&PC_Notes.ppt
Programming in C
Esoft Metro Campus - Certificate in c / c++ programming
C Programming Unit-2
PHP slides
complete data structure
Datastructurenotes 100627004340-phpapp01
Fundamentals of computer programming by Dr. A. Charan Kumari
learn basic to advance C Programming Notes
C_Progragramming_language_Tutorial_ppt_f.pptx
C Language (All Concept)
C language
c & c++ logic building concepts practice.pptx
Programming Fundamentals
Book management system
C programming language tutorial
Introduction to C Unit 1
Ad

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
PDF
Indian roads congress 037 - 2012 Flexible pavement
PDF
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
PPTX
History, Philosophy and sociology of education (1).pptx
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PPTX
B.Sc. DS Unit 2 Software Engineering.pptx
PPTX
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
Trump Administration's workforce development strategy
PPTX
Unit 4 Computer Architecture Multicore Processor.pptx
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
HVAC Specification 2024 according to central public works department
What if we spent less time fighting change, and more time building what’s rig...
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
MBA _Common_ 2nd year Syllabus _2021-22_.pdf
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Indian roads congress 037 - 2012 Flexible pavement
BP 704 T. NOVEL DRUG DELIVERY SYSTEMS (UNIT 1)
History, Philosophy and sociology of education (1).pptx
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
B.Sc. DS Unit 2 Software Engineering.pptx
ELIAS-SEZIURE AND EPilepsy semmioan session.pptx
Share_Module_2_Power_conflict_and_negotiation.pptx
1.3 FINAL REVISED K-10 PE and Health CG 2023 Grades 4-10 (1).pdf
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
Trump Administration's workforce development strategy
Unit 4 Computer Architecture Multicore Processor.pptx
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
HVAC Specification 2024 according to central public works department

Presentation on C language By Kirtika thakur

  • 3. INTRODUCTION  C is a general purpose language which is closely associated with UNIX for which is developed by Bell Laborites.  Most of the program of Unix are written and run with the help of ‘C’.  Many of the important idea of ‘C’ stream are form BPCL by Martin Richard
  • 4. Cont…  In, 1972 Dennis Richard at Bell Laborites wrote C language which cause a revolution in computing world  From beginning C was intended to be useful for busy programmers to done easily because C is powerful, dominate and supple language
  • 5. Syntax of C Language #include<stdio.h> #include<conio.h> void main() { ------- getch(); } Header File Main() is function .it is the first function from which the control statement is passed from os when a program is executed
  • 6. Control Statement Control Statement Decision control Statement If Else if Nested if Case control statement Switch Loop control statement For loop While loop
  • 8. If-else statement Definition: if (condition) { code when true } else { code not true } Example: if(A>B) { printf (“A is greater”); } else { printf(“B is greater”); } If condition is true if statement will executed if not then else statement is executed
  • 10. Nested if statement It is always legal in C programming to nest if – else statements, which means you can use one if or else if statement. Syntax: If (boolan_expression 1) { printf(“executed when the expression 1 is true ”); } If(boolan_expression 2) { printf (“executed when the boolean 2 is true”)
  • 13. Definition of Function Function definition include Function name; Function type; Parameter list ; Declarations of variable; Function statement; a return statement ; All six element are grouped into two parts: Function header Function body
  • 16. Function body The function body contain the declaration and statements necessary for performing the required task .The body enclosed in braces , contains three parts, 1.local declaration that specify the variable needed by the function 2. function statement that perform the task of the function. 3. A return statement that return the value evaluated by the function. If a function does not return any value , we can omit the return statement. Its return type should be specified as void
  • 17. Example of function Program for factorial of a number using function #include<stdio.h> #include<conio.h> Void main() { Void factorial (int); Int num; Printf(“enter the value of num”); Scanf(“% d,”& num); Factorial(num); Getch(); } Void fun(int x) { int product=1, i; for(i=x; i>=1; i--) { product= product*i; } Printf(“%d”, product); }
  • 18. Array An array is a fixed-sequential collection of element that share some data type and a common name . It is simple a group of data type. An array is a derived data type. An array is used to represent a list of number, or a list of names.
  • 20. String String are group of arrays also called character array strings always ends with null character. Syntax of string:- Data Type variable name [ size]; ex:- int a[20];