ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
WHAT IS ¡®C¡¯ LANGUAGE?
Language is a medium of interaction or communication. As we are talking
about the computer language, so it is a computer language that communicates
through the complier. Compiler performs the two major operation:
1. Debugging
2. Converter
Debugging is for making our program bugs free so that our code can work
effectively. Converter is for converting source code to object code because it we
know that computer can only understand binary/machine code. So it converts
source code to object code.
C language is developed by Brian Kernighan and Dennis Ritchie in 1972 at
AT&T Bell Labs of USA
PURPOSE:
C language is used for the software development.
FEATURES:
1. System Program Language-C is the system programing language, almost
every platforms use it UNIX, windows 3.1, Windows 95, NT.
2. Fast execution speed
3. Mobile devices, consumer devices like microwave ovens, washing machines
etc. are getting smart and this smartness comes from an operating system and
program embedded in these devices. These program not only have to run fast
but also have to work in limited amount of memory. Such an critical programs
are written in C language.
4. In 3D computer games where user navigated some objects. For navigating
objects the speed of navigation should be fast. So to match the expectation of
the player C language is used for this purpose.
CHARACTER SET: as other language has their own character set like English
has the character set of alphabets with the help of which we make words,
sentence and paragraphs. Character set are defined as the building blocks. C
language has its own character set:
Digits=0-9
Alphabets=A, B¡­.Z and a, b, c¡­.z
Special symbols ` ? ¡°? $ %&*() _ - + = {} [] etc.
CTokens: The alphabets, digits and special digit when properly combined are
called variable, constants and Keyword.
Constant are the entity that do not change during the program execution.
Variable are the entity that change during the program execution.
KEYWORDS: Keywords are also called as reserved words because the
meanings of the keywords are predefined. We cannot use them as a name of
variable because if we do this we are trying to assign new meaning to the
keywords which is not allowed. In C language there is 32 keywords:
auto double int struct
break else long switch
case enum register typedef
char extern return union
const float short unsigned
continue for signed void
default goto sizeof volatile
Do if static while
STATEMENT: Collection of C tokens prepares a C statements. After a C
statement we use a terminator which is ;.
FORMAT OF C:
? Every statement in C language terminated with ?;?.
? C is a case sensitive language so all the keywords and standard library
function should be lower case.
? Strings are placed in double quotes.
? New lines are handled via /n
PROGRAM: Collection of C statement to perform a particular task is called as
a program.
.
We use these Header Files in C. Header files are the files that store function
related to different works to be performed.
stdio.h-standard input output file in which function like printf,scanf,puts,gets
etc. are present
conio.h-console input output file in which function related to output are stored
like getch,getchar,clrscr etc.
#include<stdio.h>
#include<conio.h>
Where #include directive instruct the C pre-processor to find the header files
IMPORTANT FUNCTIONS USED WHILE CREATING A ¡®C¡¯
PROGRAM
main()- it is the most important part of your program, it defines the point at
which your program start executing. In main() you enter your coding. If you do
not write any main function you program will never execute.
clrscr ()- it clears the previous output from the output window.
getch()-it retains the output screen unit you press any key.
printf: function produces output on the screen. The sequence %.. instruct the
printf to write on the screen
scanf: scanf function is the opposite of the printf function. scanf reads from
keyboard. The sequence %.. instruct the scanf to read from keyboard. The most
important thing with the scanf is the use of & because it allow the program to
change the value of the variable. We need not to use & sign with printf because
after executing the statement the value of any variable will be automatically
assigned to that variable.
A simple Program in C
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();//for clearing all the previous output
printf(¡°WELCOME IN C LANGUAGE¡±);//prints the msg
getch();//retains the output screen
}
COMPILATION AND EXECUTION
1. Start the compiler at C> prompt.
2. Select New from the file menu
3. Type the program
4. Save the program using F2 or by using the file menu
5. Ctrl+F9 is used for compile and execute the program
6. Alt+F5 to view the previous output.
ESCAPE CHARACTERS IN C
n-New Line
t-for tab space
¡±- for double quotes
¡¯-for single quotes
-for slash symbol
b-back space
Lect '1'

More Related Content

What's hot (20)

PPT
Introduction to C Programming
MOHAMAD NOH AHMAD
?
PPTX
C++ programming language basic to advance level
sajjad ali khan
?
PPT
Programming Methodology
archikabhatia
?
PPTX
C languaGE UNIT-1
Malikireddy Bramhananda Reddy
?
PPTX
Variables and datatypes
aishvaryatamilarasoo
?
PPTX
introduction to c language
Rai University
?
PPT
Programming in c
indra Kishor
?
PPT
C introduction
Kamran
?
PPTX
C programming language
Maha lakshmi
?
PPTX
Sachin kumar ppt on programming in c
Sachin Kumar
?
PPTX
C language
marar hina
?
PPT
Tokens_C
Prabhu Govind
?
PPTX
Introduction to C programming
MalikaJoya
?
PDF
Programming in c
ankitjain851
?
PPT
introduction to C programming (C)
Abhishek Walia
?
DOC
Notes of c programming 1st unit BCA I SEM
Mansi Tyagi
?
PDF
SULTHAN's - C Programming Language notes
SULTHAN BASHA
?
PPTX
C programming
Jigarthacker
?
PDF
C lecture notes new
Kuntal Bhowmick
?
PPTX
Input output in c
Ducat
?
Introduction to C Programming
MOHAMAD NOH AHMAD
?
C++ programming language basic to advance level
sajjad ali khan
?
Programming Methodology
archikabhatia
?
Variables and datatypes
aishvaryatamilarasoo
?
introduction to c language
Rai University
?
Programming in c
indra Kishor
?
C introduction
Kamran
?
C programming language
Maha lakshmi
?
Sachin kumar ppt on programming in c
Sachin Kumar
?
C language
marar hina
?
Tokens_C
Prabhu Govind
?
Introduction to C programming
MalikaJoya
?
Programming in c
ankitjain851
?
introduction to C programming (C)
Abhishek Walia
?
Notes of c programming 1st unit BCA I SEM
Mansi Tyagi
?
SULTHAN's - C Programming Language notes
SULTHAN BASHA
?
C programming
Jigarthacker
?
C lecture notes new
Kuntal Bhowmick
?
Input output in c
Ducat
?

Viewers also liked (6)

PDF
SANDSTORM POST EVENT REPORT
Govind
?
DOC
A project report on training and development in reliance money
Projects Kart
?
PPT
Maruti Suzuki a brief PPT assignment
Navneet Jingar
?
DOCX
A project report on training and development with reference to hal
Projects Kart
?
PPTX
Maruti suzuki ppt
anurag77
?
SANDSTORM POST EVENT REPORT
Govind
?
A project report on training and development in reliance money
Projects Kart
?
Maruti Suzuki a brief PPT assignment
Navneet Jingar
?
A project report on training and development with reference to hal
Projects Kart
?
Maruti suzuki ppt
anurag77
?
Ad

Similar to Lect '1' (20)

PPTX
Basics of C Lecture 2[16097].pptx
CoolGamer16
?
PDF
C Language
Syed Zaid Irshad
?
PPTX
PROGRAMMING IN C - SARASWATHI RAMALINGAM
SaraswathiRamalingam
?
PPT
What is turbo c and how it works
Mark John Lado, MIT
?
PPTX
Unit-1_c.pptx you from the heart of the day revision
MohammedAnas871930
?
PPTX
unit2.pptx
sscprep9
?
PDF
Introduction to C programming
Kathmandu University
?
PDF
Basics of C Prog Lang.pdf
KalighatOkira
?
PDF
EC2311-Data Structures and C Programming
Padma Priya
?
PPT
Chap 1 and 2
Selva Arrunaa Mathavan
?
DOC
1. introduction to computer
Shankar Gangaju
?
PPTX
Introduction to C which deals with the basics of C
neonaveen
?
PPT
The smartpath information systems c pro
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
?
PPTX
Unit-1 (introduction to c language).pptx
saivasu4
?
DOCX
Uniti classnotes
Sowri Rajan
?
PPTX
C programming presentation(final)
aaravSingh41
?
PDF
C programme presentation
DharmaKumariBhandari
?
PPTX
Chapter1.pptx
SREEVIDYAP10
?
PDF
Unit 2 introduction to c programming
Mithun DSouza
?
PPT
history of c.ppt
arpanabharani
?
Basics of C Lecture 2[16097].pptx
CoolGamer16
?
C Language
Syed Zaid Irshad
?
PROGRAMMING IN C - SARASWATHI RAMALINGAM
SaraswathiRamalingam
?
What is turbo c and how it works
Mark John Lado, MIT
?
Unit-1_c.pptx you from the heart of the day revision
MohammedAnas871930
?
unit2.pptx
sscprep9
?
Introduction to C programming
Kathmandu University
?
Basics of C Prog Lang.pdf
KalighatOkira
?
EC2311-Data Structures and C Programming
Padma Priya
?
1. introduction to computer
Shankar Gangaju
?
Introduction to C which deals with the basics of C
neonaveen
?
The smartpath information systems c pro
The Smartpath Information Systems,Bhilai,Durg,Chhattisgarh.
?
Unit-1 (introduction to c language).pptx
saivasu4
?
Uniti classnotes
Sowri Rajan
?
C programming presentation(final)
aaravSingh41
?
C programme presentation
DharmaKumariBhandari
?
Chapter1.pptx
SREEVIDYAP10
?
Unit 2 introduction to c programming
Mithun DSouza
?
history of c.ppt
arpanabharani
?
Ad

Lect '1'

  • 1. WHAT IS ¡®C¡¯ LANGUAGE? Language is a medium of interaction or communication. As we are talking about the computer language, so it is a computer language that communicates through the complier. Compiler performs the two major operation: 1. Debugging 2. Converter Debugging is for making our program bugs free so that our code can work effectively. Converter is for converting source code to object code because it we know that computer can only understand binary/machine code. So it converts source code to object code. C language is developed by Brian Kernighan and Dennis Ritchie in 1972 at AT&T Bell Labs of USA PURPOSE: C language is used for the software development. FEATURES: 1. System Program Language-C is the system programing language, almost every platforms use it UNIX, windows 3.1, Windows 95, NT. 2. Fast execution speed 3. Mobile devices, consumer devices like microwave ovens, washing machines etc. are getting smart and this smartness comes from an operating system and program embedded in these devices. These program not only have to run fast but also have to work in limited amount of memory. Such an critical programs are written in C language. 4. In 3D computer games where user navigated some objects. For navigating objects the speed of navigation should be fast. So to match the expectation of the player C language is used for this purpose. CHARACTER SET: as other language has their own character set like English has the character set of alphabets with the help of which we make words, sentence and paragraphs. Character set are defined as the building blocks. C language has its own character set:
  • 2. Digits=0-9 Alphabets=A, B¡­.Z and a, b, c¡­.z Special symbols ` ? ¡°? $ %&*() _ - + = {} [] etc. CTokens: The alphabets, digits and special digit when properly combined are called variable, constants and Keyword. Constant are the entity that do not change during the program execution. Variable are the entity that change during the program execution. KEYWORDS: Keywords are also called as reserved words because the meanings of the keywords are predefined. We cannot use them as a name of variable because if we do this we are trying to assign new meaning to the keywords which is not allowed. In C language there is 32 keywords: auto double int struct break else long switch case enum register typedef char extern return union const float short unsigned continue for signed void default goto sizeof volatile Do if static while STATEMENT: Collection of C tokens prepares a C statements. After a C statement we use a terminator which is ;. FORMAT OF C: ? Every statement in C language terminated with ?;?. ? C is a case sensitive language so all the keywords and standard library function should be lower case. ? Strings are placed in double quotes.
  • 3. ? New lines are handled via /n PROGRAM: Collection of C statement to perform a particular task is called as a program. . We use these Header Files in C. Header files are the files that store function related to different works to be performed. stdio.h-standard input output file in which function like printf,scanf,puts,gets etc. are present conio.h-console input output file in which function related to output are stored like getch,getchar,clrscr etc. #include<stdio.h> #include<conio.h> Where #include directive instruct the C pre-processor to find the header files IMPORTANT FUNCTIONS USED WHILE CREATING A ¡®C¡¯ PROGRAM main()- it is the most important part of your program, it defines the point at which your program start executing. In main() you enter your coding. If you do not write any main function you program will never execute. clrscr ()- it clears the previous output from the output window. getch()-it retains the output screen unit you press any key. printf: function produces output on the screen. The sequence %.. instruct the printf to write on the screen scanf: scanf function is the opposite of the printf function. scanf reads from keyboard. The sequence %.. instruct the scanf to read from keyboard. The most important thing with the scanf is the use of & because it allow the program to change the value of the variable. We need not to use & sign with printf because after executing the statement the value of any variable will be automatically assigned to that variable.
  • 4. A simple Program in C #include<stdio.h> #include<conio.h> void main() { clrscr();//for clearing all the previous output printf(¡°WELCOME IN C LANGUAGE¡±);//prints the msg getch();//retains the output screen } COMPILATION AND EXECUTION 1. Start the compiler at C> prompt. 2. Select New from the file menu 3. Type the program 4. Save the program using F2 or by using the file menu 5. Ctrl+F9 is used for compile and execute the program 6. Alt+F5 to view the previous output. ESCAPE CHARACTERS IN C n-New Line t-for tab space ¡±- for double quotes ¡¯-for single quotes -for slash symbol b-back space