SlideShare a Scribd company logo
C IN PROGRAMING AND ITS
APPLICATION
BY
M.SC.(MATHEMATICS):- 4TH SEMESTER
DEPARM.SC.(MATHEMATICS):- 4TH SEMESTER
DEPARTMENT OF MATHEMATICS
R.N. COLLEGE, HAJIPUR (VAISHALI)
( B.R.A. BIHAR UNIVERSITY,(MUZAFFARPUR)
(VAISHALI)
( B.R.A. BIHAR UNIVERSITY, MUZAFFARPUR
SONU KUMAR
OVERVIEWS
 About programming in c
 Variable
 Function of printf
 Function of scanf
 Switch statement syntax
Switch flowchart
 Demonstration in c
 Some program
C PROGRAMING:- It is a programung language
developed at AT and T Bell labs USA, in 1973 by “Denish
Ritchie”
Programming language : - It is a problem solving scheme,
there are several programing Language today same are c,
c++,java, phython, …………etc
:- It is a named location of memory. It has capacity to store data
and its Value can be change during program execution.
Variable declaration Syntax
<data type> <variable name>
As, int num;
How to initialize a variable
<darta type> <variable name>= value;
Example:-
int n1,n2,res, choice;
Function printf() : - We have used it display on the Screen the value contain.
The general form of printf() function is:-
Printf (“<format string>”, <list of variable>)
Example:-
printf(“ Enter two Value”);
 scanf function is a must & is an address of operator. It gives
the location number used by the variable in memory. When we
used “%d”, we are telling scanf(“%d”) at Which memory location
should it store the value.
Example:-
scanf(“%d %d”, &n1,&n2);
Switch( )
{
Case 1;
Stetement 1 ;
Break ;
}
As so on………….
default
}
{
Stetement 1 ;
Case
1;
switch
defualt
Case
2;
Case
2;
Stop
NO
NO
NO
YES
YES
YES
YES
res = n1+n2;
res = n1/n2;
res = n1-n2;
“invalid choice”
#include<stdio.h>
or
#include.”stdio.h”
#include<conio.h>
or
#include.”conio.h”
If we use #include <stdio.h> in c
program it will stdio.h file into
our source program releted
function
It is used to include the console
input output library function,
the getch () function is defined
in conio.h file.
Void main ( )
The main ( ) function is the
entry point of every program in
c language.
Enter two values
1 = add
2 = sub
3 = multi..
4 = divi….
what you want……..?
#include<stdio.h>
#include<conio.h>
void main ()
{
int n1,n2,res,choice;
printf(“enter two values”):
scanf(“%d %d , &n1,&n2”);
printf(“1 – add/n”);
printf(“2 – add/n”);
printf(“3 – add/n”);
printf(“4 – add/n”);
PROGRAMMING IN C.pptx

More Related Content

PPTX
Basics of c Nisarg Patel
PDF
CP Handout#2
PPTX
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
PPTX
Introduction to C Unit 1
PDF
Module 1_Chapter 2_PPT (1)sasaddsdsds.pdf
PPTX
20220823094225_PPT02-Formatted Input and Output.pptx
PPTX
1_Introduction of programming language C.pptx
PPTX
Data Input and Output
Basics of c Nisarg Patel
CP Handout#2
INPUT AND OUTPUT STATEMENTS IN PROGRAMMING IN C
Introduction to C Unit 1
Module 1_Chapter 2_PPT (1)sasaddsdsds.pdf
20220823094225_PPT02-Formatted Input and Output.pptx
1_Introduction of programming language C.pptx
Data Input and Output

Similar to PROGRAMMING IN C.pptx (20)

PPTX
Managing input and output operation in c
DOCX
UNIT-II CP DOC.docx
PPT
PPTX
CHAPTER 4
PPTX
C_Progragramming_language_Tutorial_ppt_f.pptx
PPT
CPU INPUT OUTPUT
PPTX
Unit 2 CMath behind coding.pptx
PPTX
Functions of stdio conio
PPTX
Introduction to C programming
PPTX
Sachin kumar ppt on programming in c
PPTX
4 Introduction to C.pptxSSSSSSSSSSSSSSSS
PPTX
CSE-1204-Lab-02-Variables and Data Types.pptx
PPT
lec 1 for ITC Introduction to computing and AI
PPTX
Fundamentals of Programming Constructs.pptx
PPTX
Input and Output In C Language
PPTX
PPTX
C programming(part 3)
PPTX
C introduction by thooyavan
PPSX
Esoft Metro Campus - Certificate in c / c++ programming
PPTX
C for Engineers
Managing input and output operation in c
UNIT-II CP DOC.docx
CHAPTER 4
C_Progragramming_language_Tutorial_ppt_f.pptx
CPU INPUT OUTPUT
Unit 2 CMath behind coding.pptx
Functions of stdio conio
Introduction to C programming
Sachin kumar ppt on programming in c
4 Introduction to C.pptxSSSSSSSSSSSSSSSS
CSE-1204-Lab-02-Variables and Data Types.pptx
lec 1 for ITC Introduction to computing and AI
Fundamentals of Programming Constructs.pptx
Input and Output In C Language
C programming(part 3)
C introduction by thooyavan
Esoft Metro Campus - Certificate in c / c++ programming
C for Engineers
Ad

More from SONU KUMAR (10)

PPTX
GROUP AND SUBGROUP PPT 20By SONU KUMAR.pptx
PPTX
SOME IMPORTANT TOPICS OF GROUP THEORY IN MODERN by Sonukumar .pptx
PPTX
Application of C language by Sonu kumar.pptx
PPTX
Programming in C by SONU KUMAR.pptx
PPTX
SOME IMPORTANT TOPICS OF GROUP THEORY IN MODERN-1.pptx
PPTX
NUMBER THEORY BY SONU KUMAR.pptx
PPTX
NATIONAL MATHEMATICS DAY BY SONU KUMAR.pptx 123.pptx
PPTX
GROUP THEORY PPT,SUBGROUP, ABELIAN GROUP,
PPTX
SET THEORY AND THEIR APLICATION
PPTX
GROUP, SUBGROUP, ABELIAN GROUP, NORMAL SUBGROUP, CONJUGATE NUMBER,NORMALIZER ...
GROUP AND SUBGROUP PPT 20By SONU KUMAR.pptx
SOME IMPORTANT TOPICS OF GROUP THEORY IN MODERN by Sonukumar .pptx
Application of C language by Sonu kumar.pptx
Programming in C by SONU KUMAR.pptx
SOME IMPORTANT TOPICS OF GROUP THEORY IN MODERN-1.pptx
NUMBER THEORY BY SONU KUMAR.pptx
NATIONAL MATHEMATICS DAY BY SONU KUMAR.pptx 123.pptx
GROUP THEORY PPT,SUBGROUP, ABELIAN GROUP,
SET THEORY AND THEIR APLICATION
GROUP, SUBGROUP, ABELIAN GROUP, NORMAL SUBGROUP, CONJUGATE NUMBER,NORMALIZER ...
Ad

Recently uploaded (20)

PDF
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
What if we spent less time fighting change, and more time building what’s rig...
PDF
HVAC Specification 2024 according to central public works department
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PPTX
TNA_Presentation-1-Final(SAVE)) (1).pptx
PDF
IGGE1 Understanding the Self1234567891011
PDF
Practical Manual AGRO-233 Principles and Practices of Natural Farming
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
advance database management system book.pdf
PPTX
Share_Module_2_Power_conflict_and_negotiation.pptx
PDF
Hazard Identification & Risk Assessment .pdf
PPTX
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
PDF
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
PDF
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Introduction to Building Materials
FOISHS ANNUAL IMPLEMENTATION PLAN 2025.pdf
Paper A Mock Exam 9_ Attempt review.pdf.
What if we spent less time fighting change, and more time building what’s rig...
HVAC Specification 2024 according to central public works department
LDMMIA Reiki Yoga Finals Review Spring Summer
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
TNA_Presentation-1-Final(SAVE)) (1).pptx
IGGE1 Understanding the Self1234567891011
Practical Manual AGRO-233 Principles and Practices of Natural Farming
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
advance database management system book.pdf
Share_Module_2_Power_conflict_and_negotiation.pptx
Hazard Identification & Risk Assessment .pdf
CHAPTER IV. MAN AND BIOSPHERE AND ITS TOTALITY.pptx
Vision Prelims GS PYQ Analysis 2011-2022 www.upscpdf.com.pdf
David L Page_DCI Research Study Journey_how Methodology can inform one's prac...
1_English_Language_Set_2.pdf probationary
Introduction to Building Materials

PROGRAMMING IN C.pptx

  • 1. C IN PROGRAMING AND ITS APPLICATION BY M.SC.(MATHEMATICS):- 4TH SEMESTER DEPARM.SC.(MATHEMATICS):- 4TH SEMESTER DEPARTMENT OF MATHEMATICS R.N. COLLEGE, HAJIPUR (VAISHALI) ( B.R.A. BIHAR UNIVERSITY,(MUZAFFARPUR) (VAISHALI) ( B.R.A. BIHAR UNIVERSITY, MUZAFFARPUR SONU KUMAR
  • 2. OVERVIEWS  About programming in c  Variable  Function of printf  Function of scanf  Switch statement syntax Switch flowchart  Demonstration in c  Some program
  • 3. C PROGRAMING:- It is a programung language developed at AT and T Bell labs USA, in 1973 by “Denish Ritchie” Programming language : - It is a problem solving scheme, there are several programing Language today same are c, c++,java, phython, …………etc
  • 4. :- It is a named location of memory. It has capacity to store data and its Value can be change during program execution. Variable declaration Syntax <data type> <variable name> As, int num; How to initialize a variable <darta type> <variable name>= value; Example:- int n1,n2,res, choice;
  • 5. Function printf() : - We have used it display on the Screen the value contain. The general form of printf() function is:- Printf (“<format string>”, <list of variable>) Example:- printf(“ Enter two Value”);
  • 6.  scanf function is a must & is an address of operator. It gives the location number used by the variable in memory. When we used “%d”, we are telling scanf(“%d”) at Which memory location should it store the value. Example:- scanf(“%d %d”, &n1,&n2);
  • 7. Switch( ) { Case 1; Stetement 1 ; Break ; } As so on…………. default } { Stetement 1 ;
  • 9. #include<stdio.h> or #include.”stdio.h” #include<conio.h> or #include.”conio.h” If we use #include <stdio.h> in c program it will stdio.h file into our source program releted function It is used to include the console input output library function, the getch () function is defined in conio.h file. Void main ( ) The main ( ) function is the entry point of every program in c language.
  • 10. Enter two values 1 = add 2 = sub 3 = multi.. 4 = divi…. what you want……..? #include<stdio.h> #include<conio.h> void main () { int n1,n2,res,choice; printf(“enter two values”): scanf(“%d %d , &n1,&n2”); printf(“1 – add/n”); printf(“2 – add/n”); printf(“3 – add/n”); printf(“4 – add/n”);