SlideShare a Scribd company logo
1 of 11
Download to read offline
„C‟ Programming language
Language: - language is a medium of communication.
Communication: - It is two way process.
Programming: - It is a set by step execution Ex. Birthday party
Programming Language: - The language we need to interact with the computer is called
programming language.

„C‟ language was developed in 1970‟s at bell laboratories by Dennis Ritchie
 Computer is first made for doing large amount of calculation.
 Programme is set of instructions.
Programming language
1) High level
2)Low level

Low level language: - Low level languages are the machine level and assembly
language.
1) Machine language:-computers are understands only digital signals. Which are
binary digit o &1 the machine language consists of instructions that are in binary 0
or 1. Computer understanding machine level language
2) Assembly language: - It is the modified form of machine level language assembly
language is given in English like words such as , add, sub, etc

High level language:-Use of operators interacts of mnemonic code the solution of
mnemonic codes (they work on English language) because for them we need to use and learn
all these coded. Ex. Operators +,-,*, / etc
COBOL ==== Business Purpose
FORTON ==== Calculations Purpose
PASCAL====Science
Purpose........etc
 System independent- via OS
 These are like English language it is easy to understand the programme of high level
language.
 Every language has its own compiler or interpreter Ex. COBOL (business) basic Pascal
(calculation) etc.

 System deportment
 Which can interact with system directly
 In low level programming are made for machine. To make the computerized machine.
 We use coding in machines because its interacts with system directly.
Drawback:  These languages were for some specific task.
 Can use only predefined function and cannot modified it no use programmer not
bit programming (system programming)
Hence assembly language program must be translated into machine language. The
translator that is used for translating is called “assembler”
English==== (H.L.L) ========Compiler===== (L.L.L) ===== 0 & 1
148 languages are working at present time.
/* this program...*/: - The symbols /* and */ delimit a comment. Comments are ignored by the
compiler 1, and are used to provide useful information for Humans that will read the program.
Bit level Programming: Software: - A set of one or more programs designed to control the operation of a computer system. They
are general programs written to assist humans in the use of computer system and for making the
operation of the computer system more effective and efficient.

Software

System software

Application Software

1) System software: - Aaise software jo hardware ko chalane ke lia able banayein. Ex.
Drivers, keyboard, Mouse, Operating System
2) Application Software: - Application software for performing particular task. It is
requirement of user Ex. Windows‟s media player, M.S offices, tally, etc.

System software
Middle level language
Application software

Note: - C is a HLL with low level features that is why it is known as middle level
language.
ALGOL 60................................in 1960
CPL.........................................
BCPL...................................................
B (ken Thomson).....................
C.............................................. in 1972

12 years

C: - c is stable language because

develop Dennis Ritchie language at AT ans

T Bell Laboratory, USA
.h: - Extinction of header file.
Extinction, It is the identification of file. Ex- .mp3, .doc, .txt, etc
Function: -It is the groups of statement or it is the block
In C language 48 header files and 3200 function.
There are two typesFirst formatted function and second is unformatted function.
1) Stdio.h: - (standard input output header file)
Ex- printf (); scanf (); gets (); puts (); etc
Question: what is f?
Answer: -it is used f end of the function. And other unformatted function.
String: -sequence of the character “hello”.
Conio.h: - (console input/output)
Delimiters: - delimiters are used for syntactic meaning in C. These are as given follows.
Delimiters
:

Name
Colon

syntactic meaning
used for label

;

Semicolon

end of statement

()

Parentheses

Used in expression

[]

Square brackets

{}
statements

Curly Braces

#
directive

Hash

,

Comma

Used for array
Used for block of
Pre-processors
Variable delimiter

C Character Set: - The character that are used to form the words, numbers and expressions. The
character are classified as follows




Letters
Digits
Special Characters
Letters:
C language comprises the following set of letters to form a standard program. They are :
A to Z in Capital letters.
a to z in Small letters.

Special Characters:
C language contains the following special character in association with the letters and digits.

Symbol

Meaning

~
!
#
$
%
^
&
*
(
)
_
+
|

`
=
{
}
[
]
:
"
;
<
>
?
,
.
/

Tilde
Exclamation mark
Number sign
Dollar sign
Percent sign
Caret
Ampersand
Asterisk
Lest parenthesis
Right parenthesis
Underscore
Plus sign
Vertical bar
Backslash
Apostrophe
Minus sign
Equal to sign
Left brace
Right brace
Left bracket
Right bracket
Colon
Quotation mark
Semicolon
Opening angle bracket
Closing angle bracket
Question mark
Comma
Period
Slash
Function: - function is a group of statement or a block of code, which is executed step by step when it is
called.
Generally hm function ka use value return karne ke lia karte hai.
Kisi kaam ko baar baar repeat karne ke lia hm function ka use karte hai.
Main advantage yeh hai ki reuse means reusability bole toh reusable .
There are two types
1.Predefine
2.User define
1.Predefine: yeh programmer ke through banayi jati hai.
2.User define yeh user ke through but bina predefine function ke help ke bina user define nhi
banaya jaa skta hai Q ki statement ki code hmare bas kin hi hai……..
Way of writing of create function or way of coding
Syntax: likhane kaa tarika hm function ko create karne ke kia kaise likhenge
Syntax:< > (angular bracket)  that filled mandatory
[ ] ( optional bracket)according to wise(jararut ho toh lagao yaa mat lagao)
Syntax:
<return type><function name>([function parameter])
{
Body of statement
}

1:
<return type>
Jis type kaa data aap return karna chahte hai aap kar skte ho jaise..
Intfloatdouble etc….
*Agar aap kisi type kaa address return karna chahte hain toh pointer laga do.
Jaise ….int*float*double* etc
** Kisi bhi type kaa type kaa address return karana chahte hai toh toh void* lagalo.
Agar aap return nhi karna chahte ho toh void laga do.
Return type me data type ata ayega…by default agar aaap koi data type nhi lete hain toh wo int laga leta
hai .
2: <function name> jo variable pe rule hai same wahi 8 rule yaha bhi kareenge.
1.no space allow no use special char etc.
Parameter[];
Parameter me hm variable dete hain jise hm signature kahte hain
** jitney parameter ki variable declare kia ho calling ke time bi utne hi variable hone chahia.
Jaise…
Void show (int a,int b)
{
}
Show(10,x);
Void show(int a,int b,float c)

// show is the signature

{
}
Show(10,x,10.0);
Function hm four type ke create karte hain.
1- Without return type without parameter
Ex- void show() // called fuction
Printf(“welcome to the world of funtion”);
}
Void main();  calling funtion
{
Clrscr();
Show();
 function calling
Getch();
}
2- Without return type with parameter
Ex- void prime(int x)
3- With return type without parameter
Ex- int show()
4- With return type with parameter
Ex- int add(int a,int b)
Hm function kaa ek program banate hai,
Void show()
{
Printf(“enter the would of funtion”);
}
Void display()
{
Show();
}
Void main()
{
Clrscr();
Display();
Getch();
}
Jab bhi aap function banaye wo calling function ke upper hi banaye Q ki hmra compilre waha tak nhi
pahuch pata hain wo toh uska proto type matching check karta hain.
Wo matching -2 dhundhega toh chalega agar aap calling function ke niche banana chahte hain toh
upper aap ko uska proto type declear(likhana hoga) karna hoga.
Ex.
Void show();
Void main()
{
Clrscr();
Show();
Getch();
}
Void show()
{
Printf(“hellow”);
}

**pahle sare proto type likh lo phir coading karo okay
Need of parameter:
1----user se value lena
2—fixed value
3— function ke ander function
Note--- aalag -2 funtion me same name ke variable ho skte hain.
Ex—
Void add1(int a,int b)
{
Printf(“%d”,a+b);
}
Void main()
{
Int a,b;
Clrscr();
 add1(10,20);
Add1(pow(2.3),sqrt(1));
Pirintf(“%d%d”,a,b);
Add1(a,b)
Getch();
}
Return statement can return only one value at a time…………..
Ex-1
Int add (int a,int b)
{
Return a+b;
}
Ex-2
Int add (int a,int b)
{
Return a+b; // yaha se program teminate ho gayega
Return a-b;
}
Note: hme saare function ke return type banana chahia jinse koi ek value aati ho
Toh waha return karao
Call by value call by rreference:::: jab aap fuction ko call karenge as a parameter koi vale pass
karenge toh waha call by value hoga..
100% me se 95% call by value se hi function ki calling hoti hai.
Call by reference:--------------------------------------------------------------------------------------------

_ _ _ __________________________________________________________________________ ______
Header file: groups of function.
Ex. <My.h>
Codind……..
int iseven(int n)
Functin of cheak even or not
{
if(n%2==0)
return 1;
else
return 0;
}
int isleap(int n)
{
if((n%4==0 && n%100!=0)||(n%400==0))
return 1;
else
return 0;
}
int isprime(int n)
{
int i;
for(i=2;i<=n/2;i++)
{
if(n%i==0)return 0;
}
return 1;
}
long length(long n)
{
int count=0;
while(n>0)//123>0,12>0,1>0,0>0
{
count++;//count=0+1=1+1=2+1=3
n=n/10;//123/10=12/10=1/10=0
}
return count;//3
}
long sum(long n)
{
//123
long s=0;
while(n>0)
{
s=s+n%10;
n=n/10;
}
return s;
}
long rev(long n)
{
//123
long s=0;
while(n>0)
{
s=s*10+n%10;
n=n/10;
}
return s;
}
ispal(long n)
{
long s=0;
long x;
x=n;
while(n>0)
{
s=s*10+n%10;
n=n/10;
}
if(s==x)return 1;
else
return 0;
}
isarm(long n)
{
long s=0,x;
x=n;
while(n>0)
{
s=s+(n%10)*(n%10)*(n%10);
n=n/10;
}
if(s==x)return 1;
else
return 0;
}
int fact(int n)
{
int i,x=1;
for(i=1;i<=n;i++)
{
x=x*i;
}
return x;
}
C

More Related Content

What's hot

Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin Kumar
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming languageKumar Gaurav
 
introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)Abhishek Walia
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C ProgrammingMOHAMAD NOH AHMAD
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topicsveningstonk
 
Basic C Programming language
Basic C Programming languageBasic C Programming language
Basic C Programming languageAbhishek Soni
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I vampugani
 
Chapter3
Chapter3Chapter3
Chapter3Kamran
 
What is token c programming
What is token c programmingWhat is token c programming
What is token c programmingRumman Ansari
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical AnalysisMunni28
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IVManoj Patil
 
C programming language
C programming languageC programming language
C programming languageMaha lakshmi
 

What's hot (19)

C Programming - Refresher - Part IV
C Programming - Refresher - Part IVC Programming - Refresher - Part IV
C Programming - Refresher - Part IV
 
Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming language
 
Programming in c
Programming in cProgramming in c
Programming in c
 
introduction to C programming (C)
introduction to C programming (C)introduction to C programming (C)
introduction to C programming (C)
 
Compilers Design
Compilers DesignCompilers Design
Compilers Design
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
Unit 1 c - all topics
Unit 1   c - all topicsUnit 1   c - all topics
Unit 1 c - all topics
 
Basic C Programming language
Basic C Programming languageBasic C Programming language
Basic C Programming language
 
Introduction to C Programming - I
Introduction to C Programming - I Introduction to C Programming - I
Introduction to C Programming - I
 
Chapter3
Chapter3Chapter3
Chapter3
 
What is token c programming
What is token c programmingWhat is token c programming
What is token c programming
 
Basics1
Basics1Basics1
Basics1
 
Basic c
Basic cBasic c
Basic c
 
Lexical Analysis
Lexical AnalysisLexical Analysis
Lexical Analysis
 
System Programming Unit IV
System Programming Unit IVSystem Programming Unit IV
System Programming Unit IV
 
CProgrammingTutorial
CProgrammingTutorialCProgrammingTutorial
CProgrammingTutorial
 
C programming language
C programming languageC programming language
C programming language
 

Viewers also liked

Derechos de las pcd
Derechos de las pcdDerechos de las pcd
Derechos de las pcdNoe Toledo
 
Fall 2014 Student Teaching Info Meeting
Fall 2014 Student Teaching Info Meeting Fall 2014 Student Teaching Info Meeting
Fall 2014 Student Teaching Info Meeting AppstateCollegeofEd
 
Student Teaching Informational Meeting
Student Teaching Informational Meeting Student Teaching Informational Meeting
Student Teaching Informational Meeting AppstateCollegeofEd
 
Edmodo training power_point
Edmodo training power_pointEdmodo training power_point
Edmodo training power_pointCasey Boothby
 
Presentación de Venezuela con himno
Presentación de Venezuela con himnoPresentación de Venezuela con himno
Presentación de Venezuela con himnojosemanuelgomez2000
 
Phoenix presentation
Phoenix presentationPhoenix presentation
Phoenix presentationYonatanKay1
 
Justice ,justice shall you pursue
Justice ,justice shall you pursueJustice ,justice shall you pursue
Justice ,justice shall you pursueYonatanKay1
 
Two system approach to choices and judgements
Two system approach to choices and judgementsTwo system approach to choices and judgements
Two system approach to choices and judgementsVarunibs13
 
Chapter 1 section 2 ppt
Chapter 1 section 2 pptChapter 1 section 2 ppt
Chapter 1 section 2 pptCasey Boothby
 
The Power of Massive Informal Learning Environments
The Power of Massive Informal Learning EnvironmentsThe Power of Massive Informal Learning Environments
The Power of Massive Informal Learning EnvironmentsDonny Tusler
 
Le dinamiche relazionali, group working e cooperative learning 1
Le dinamiche relazionali, group working e cooperative learning 1Le dinamiche relazionali, group working e cooperative learning 1
Le dinamiche relazionali, group working e cooperative learning 1Sara Marzo
 

Viewers also liked (17)

Computer types
Computer typesComputer types
Computer types
 
Alok photoshop 2
Alok photoshop 2Alok photoshop 2
Alok photoshop 2
 
cursor kelompok
cursor kelompokcursor kelompok
cursor kelompok
 
Bluebeauty
BluebeautyBluebeauty
Bluebeauty
 
Derechos de las pcd
Derechos de las pcdDerechos de las pcd
Derechos de las pcd
 
Introduzione a WatchKit
Introduzione a WatchKitIntroduzione a WatchKit
Introduzione a WatchKit
 
Fall 2014 Student Teaching Info Meeting
Fall 2014 Student Teaching Info Meeting Fall 2014 Student Teaching Info Meeting
Fall 2014 Student Teaching Info Meeting
 
Student Teaching Informational Meeting
Student Teaching Informational Meeting Student Teaching Informational Meeting
Student Teaching Informational Meeting
 
Edmodo training power_point
Edmodo training power_pointEdmodo training power_point
Edmodo training power_point
 
Presentación de Venezuela con himno
Presentación de Venezuela con himnoPresentación de Venezuela con himno
Presentación de Venezuela con himno
 
Phoenix presentation
Phoenix presentationPhoenix presentation
Phoenix presentation
 
Justice ,justice shall you pursue
Justice ,justice shall you pursueJustice ,justice shall you pursue
Justice ,justice shall you pursue
 
Two system approach to choices and judgements
Two system approach to choices and judgementsTwo system approach to choices and judgements
Two system approach to choices and judgements
 
Chapter 1 section 2 ppt
Chapter 1 section 2 pptChapter 1 section 2 ppt
Chapter 1 section 2 ppt
 
Discriminación
Discriminación Discriminación
Discriminación
 
The Power of Massive Informal Learning Environments
The Power of Massive Informal Learning EnvironmentsThe Power of Massive Informal Learning Environments
The Power of Massive Informal Learning Environments
 
Le dinamiche relazionali, group working e cooperative learning 1
Le dinamiche relazionali, group working e cooperative learning 1Le dinamiche relazionali, group working e cooperative learning 1
Le dinamiche relazionali, group working e cooperative learning 1
 

Similar to C

C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
C_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxC_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxLikhil181
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse studentsAbdur Rahim
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 
C programming session 01
C programming session 01C programming session 01
C programming session 01Dushmanta Nath
 
C notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semC notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semKavita Dagar
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programmingMithun DSouza
 
C prog ppt
C prog pptC prog ppt
C prog pptxinoe
 
C Programming ppt for beginners . Introduction
C Programming ppt for beginners . IntroductionC Programming ppt for beginners . Introduction
C Programming ppt for beginners . Introductionraghukatagall2
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Rohit Singh
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingVijaySharma802
 
Introduction to c
Introduction to cIntroduction to c
Introduction to camol_chavan
 
Python programming workshop session 1
Python programming workshop session 1Python programming workshop session 1
Python programming workshop session 1Abdul Haseeb
 

Similar to C (20)

Unit1 C
Unit1 CUnit1 C
Unit1 C
 
Unit1 C
Unit1 CUnit1 C
Unit1 C
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
C programme presentation
C programme presentationC programme presentation
C programme presentation
 
C_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptxC_Programming_Language_tutorial__Autosaved_.pptx
C_Programming_Language_tutorial__Autosaved_.pptx
 
C programming languag for cse students
C programming languag for cse studentsC programming languag for cse students
C programming languag for cse students
 
C Lang notes.ppt
C Lang notes.pptC Lang notes.ppt
C Lang notes.ppt
 
C Programming Unit-1
C Programming Unit-1C Programming Unit-1
C Programming Unit-1
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
C structure
C structureC structure
C structure
 
C programming session 01
C programming session 01C programming session 01
C programming session 01
 
C notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-semC notes diploma-ee-3rd-sem
C notes diploma-ee-3rd-sem
 
Unit 2 introduction to c programming
Unit 2   introduction to c programmingUnit 2   introduction to c programming
Unit 2 introduction to c programming
 
C prog ppt
C prog pptC prog ppt
C prog ppt
 
Learn C
Learn CLearn C
Learn C
 
C Programming ppt for beginners . Introduction
C Programming ppt for beginners . IntroductionC Programming ppt for beginners . Introduction
C Programming ppt for beginners . Introduction
 
Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)Learn c language Important topics ( Easy & Logical, & smart way of learning)
Learn c language Important topics ( Easy & Logical, & smart way of learning)
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Introduction to c
Introduction to cIntroduction to c
Introduction to c
 
Python programming workshop session 1
Python programming workshop session 1Python programming workshop session 1
Python programming workshop session 1
 

Recently uploaded

Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationMJDuyan
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapitolTechU
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxraviapr7
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...CaraSkikne1
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxEduSkills OECD
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxDr. Asif Anas
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxiammrhaywood
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxKatherine Villaluna
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational PhilosophyShuvankar Madhu
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsEugene Lysak
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptxSandy Millin
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17Celine George
 

Recently uploaded (20)

Benefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive EducationBenefits & Challenges of Inclusive Education
Benefits & Challenges of Inclusive Education
 
CapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptxCapTechU Doctoral Presentation -March 2024 slides.pptx
CapTechU Doctoral Presentation -March 2024 slides.pptx
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
Prescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptxPrescribed medication order and communication skills.pptx
Prescribed medication order and communication skills.pptx
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...5 charts on South Africa as a source country for international student recrui...
5 charts on South Africa as a source country for international student recrui...
 
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptxPISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
PISA-VET launch_El Iza Mohamedou_19 March 2024.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
Ultra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptxUltra structure and life cycle of Plasmodium.pptx
Ultra structure and life cycle of Plasmodium.pptx
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptxAUDIENCE THEORY -- FANDOM -- JENKINS.pptx
AUDIENCE THEORY -- FANDOM -- JENKINS.pptx
 
Practical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptxPractical Research 1 Lesson 9 Scope and delimitation.pptx
Practical Research 1 Lesson 9 Scope and delimitation.pptx
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
Philosophy of Education and Educational Philosophy
Philosophy of Education  and Educational PhilosophyPhilosophy of Education  and Educational Philosophy
Philosophy of Education and Educational Philosophy
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
The Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George WellsThe Stolen Bacillus by Herbert George Wells
The Stolen Bacillus by Herbert George Wells
 
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
2024.03.23 What do successful readers do - Sandy Millin for PARK.pptx
 
How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17How to Show Error_Warning Messages in Odoo 17
How to Show Error_Warning Messages in Odoo 17
 

C

  • 1. „C‟ Programming language Language: - language is a medium of communication. Communication: - It is two way process. Programming: - It is a set by step execution Ex. Birthday party Programming Language: - The language we need to interact with the computer is called programming language. „C‟ language was developed in 1970‟s at bell laboratories by Dennis Ritchie  Computer is first made for doing large amount of calculation.  Programme is set of instructions. Programming language 1) High level 2)Low level Low level language: - Low level languages are the machine level and assembly language. 1) Machine language:-computers are understands only digital signals. Which are binary digit o &1 the machine language consists of instructions that are in binary 0 or 1. Computer understanding machine level language 2) Assembly language: - It is the modified form of machine level language assembly language is given in English like words such as , add, sub, etc High level language:-Use of operators interacts of mnemonic code the solution of mnemonic codes (they work on English language) because for them we need to use and learn all these coded. Ex. Operators +,-,*, / etc COBOL ==== Business Purpose FORTON ==== Calculations Purpose PASCAL====Science Purpose........etc  System independent- via OS  These are like English language it is easy to understand the programme of high level language.  Every language has its own compiler or interpreter Ex. COBOL (business) basic Pascal (calculation) etc.  System deportment  Which can interact with system directly
  • 2.  In low level programming are made for machine. To make the computerized machine.  We use coding in machines because its interacts with system directly. Drawback:  These languages were for some specific task.  Can use only predefined function and cannot modified it no use programmer not bit programming (system programming) Hence assembly language program must be translated into machine language. The translator that is used for translating is called “assembler” English==== (H.L.L) ========Compiler===== (L.L.L) ===== 0 & 1 148 languages are working at present time. /* this program...*/: - The symbols /* and */ delimit a comment. Comments are ignored by the compiler 1, and are used to provide useful information for Humans that will read the program. Bit level Programming: Software: - A set of one or more programs designed to control the operation of a computer system. They are general programs written to assist humans in the use of computer system and for making the operation of the computer system more effective and efficient. Software System software Application Software 1) System software: - Aaise software jo hardware ko chalane ke lia able banayein. Ex. Drivers, keyboard, Mouse, Operating System 2) Application Software: - Application software for performing particular task. It is requirement of user Ex. Windows‟s media player, M.S offices, tally, etc. System software Middle level language Application software Note: - C is a HLL with low level features that is why it is known as middle level language.
  • 3. ALGOL 60................................in 1960 CPL......................................... BCPL................................................... B (ken Thomson)..................... C.............................................. in 1972 12 years C: - c is stable language because develop Dennis Ritchie language at AT ans T Bell Laboratory, USA .h: - Extinction of header file. Extinction, It is the identification of file. Ex- .mp3, .doc, .txt, etc Function: -It is the groups of statement or it is the block In C language 48 header files and 3200 function. There are two typesFirst formatted function and second is unformatted function. 1) Stdio.h: - (standard input output header file) Ex- printf (); scanf (); gets (); puts (); etc Question: what is f? Answer: -it is used f end of the function. And other unformatted function. String: -sequence of the character “hello”. Conio.h: - (console input/output) Delimiters: - delimiters are used for syntactic meaning in C. These are as given follows. Delimiters : Name Colon syntactic meaning used for label ; Semicolon end of statement () Parentheses Used in expression [] Square brackets {} statements Curly Braces # directive Hash , Comma Used for array Used for block of Pre-processors Variable delimiter C Character Set: - The character that are used to form the words, numbers and expressions. The character are classified as follows    Letters Digits Special Characters
  • 4. Letters: C language comprises the following set of letters to form a standard program. They are : A to Z in Capital letters. a to z in Small letters. Special Characters: C language contains the following special character in association with the letters and digits. Symbol Meaning ~ ! # $ % ^ & * ( ) _ + | ` = { } [ ] : " ; < > ? , . / Tilde Exclamation mark Number sign Dollar sign Percent sign Caret Ampersand Asterisk Lest parenthesis Right parenthesis Underscore Plus sign Vertical bar Backslash Apostrophe Minus sign Equal to sign Left brace Right brace Left bracket Right bracket Colon Quotation mark Semicolon Opening angle bracket Closing angle bracket Question mark Comma Period Slash
  • 5. Function: - function is a group of statement or a block of code, which is executed step by step when it is called. Generally hm function ka use value return karne ke lia karte hai. Kisi kaam ko baar baar repeat karne ke lia hm function ka use karte hai. Main advantage yeh hai ki reuse means reusability bole toh reusable . There are two types 1.Predefine 2.User define 1.Predefine: yeh programmer ke through banayi jati hai. 2.User define yeh user ke through but bina predefine function ke help ke bina user define nhi banaya jaa skta hai Q ki statement ki code hmare bas kin hi hai…….. Way of writing of create function or way of coding Syntax: likhane kaa tarika hm function ko create karne ke kia kaise likhenge Syntax:< > (angular bracket)  that filled mandatory [ ] ( optional bracket)according to wise(jararut ho toh lagao yaa mat lagao) Syntax: <return type><function name>([function parameter]) { Body of statement } 1: <return type> Jis type kaa data aap return karna chahte hai aap kar skte ho jaise.. Intfloatdouble etc…. *Agar aap kisi type kaa address return karna chahte hain toh pointer laga do. Jaise ….int*float*double* etc ** Kisi bhi type kaa type kaa address return karana chahte hai toh toh void* lagalo. Agar aap return nhi karna chahte ho toh void laga do. Return type me data type ata ayega…by default agar aaap koi data type nhi lete hain toh wo int laga leta hai . 2: <function name> jo variable pe rule hai same wahi 8 rule yaha bhi kareenge. 1.no space allow no use special char etc. Parameter[]; Parameter me hm variable dete hain jise hm signature kahte hain ** jitney parameter ki variable declare kia ho calling ke time bi utne hi variable hone chahia. Jaise…
  • 6. Void show (int a,int b) { } Show(10,x); Void show(int a,int b,float c) // show is the signature { } Show(10,x,10.0); Function hm four type ke create karte hain. 1- Without return type without parameter Ex- void show() // called fuction Printf(“welcome to the world of funtion”); } Void main(); calling funtion { Clrscr(); Show(); function calling Getch(); } 2- Without return type with parameter Ex- void prime(int x) 3- With return type without parameter Ex- int show() 4- With return type with parameter Ex- int add(int a,int b) Hm function kaa ek program banate hai, Void show() { Printf(“enter the would of funtion”); } Void display() { Show(); } Void main() { Clrscr(); Display(); Getch();
  • 7. } Jab bhi aap function banaye wo calling function ke upper hi banaye Q ki hmra compilre waha tak nhi pahuch pata hain wo toh uska proto type matching check karta hain. Wo matching -2 dhundhega toh chalega agar aap calling function ke niche banana chahte hain toh upper aap ko uska proto type declear(likhana hoga) karna hoga. Ex. Void show(); Void main() { Clrscr(); Show(); Getch(); } Void show() { Printf(“hellow”); } **pahle sare proto type likh lo phir coading karo okay Need of parameter: 1----user se value lena 2—fixed value 3— function ke ander function Note--- aalag -2 funtion me same name ke variable ho skte hain. Ex— Void add1(int a,int b) { Printf(“%d”,a+b); } Void main() { Int a,b; Clrscr(); add1(10,20); Add1(pow(2.3),sqrt(1)); Pirintf(“%d%d”,a,b); Add1(a,b) Getch(); } Return statement can return only one value at a time…………..
  • 8. Ex-1 Int add (int a,int b) { Return a+b; } Ex-2 Int add (int a,int b) { Return a+b; // yaha se program teminate ho gayega Return a-b; } Note: hme saare function ke return type banana chahia jinse koi ek value aati ho Toh waha return karao Call by value call by rreference:::: jab aap fuction ko call karenge as a parameter koi vale pass karenge toh waha call by value hoga.. 100% me se 95% call by value se hi function ki calling hoti hai. Call by reference:-------------------------------------------------------------------------------------------- _ _ _ __________________________________________________________________________ ______ Header file: groups of function. Ex. <My.h> Codind…….. int iseven(int n) Functin of cheak even or not { if(n%2==0) return 1; else return 0; } int isleap(int n) { if((n%4==0 && n%100!=0)||(n%400==0)) return 1; else return 0; }
  • 9. int isprime(int n) { int i; for(i=2;i<=n/2;i++) { if(n%i==0)return 0; } return 1; } long length(long n) { int count=0; while(n>0)//123>0,12>0,1>0,0>0 { count++;//count=0+1=1+1=2+1=3 n=n/10;//123/10=12/10=1/10=0 } return count;//3 } long sum(long n) { //123 long s=0; while(n>0) { s=s+n%10; n=n/10; } return s; } long rev(long n) { //123 long s=0; while(n>0) { s=s*10+n%10; n=n/10; } return s; } ispal(long n) { long s=0; long x;
  • 10. x=n; while(n>0) { s=s*10+n%10; n=n/10; } if(s==x)return 1; else return 0; } isarm(long n) { long s=0,x; x=n; while(n>0) { s=s+(n%10)*(n%10)*(n%10); n=n/10; } if(s==x)return 1; else return 0; } int fact(int n) { int i,x=1; for(i=1;i<=n;i++) { x=x*i; } return x; }