SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Computer Languages
Dr.VMS
Computer programming language
Programming languages are used for expressing a
set of detailed instructions for a digital computer.
Such instructions can be executed directly when
they are in the computer manufacturer-specific
numerical form known as machine language, after a
simple substitution process when expressed in a
corresponding assembly language, or after
translation from some “higher-level” language.
Assembly language
Assembly language is one level
above machine language. It uses
short mnemonic codes for instructions and allows
the programmer to introduce names for blocks of
memory that hold data. One might thus write “add
pay, total” instead of “0110101100101000” for an
instruction that adds two numbers.
Machine language
 The numeric codes for the operations that a particular computer can
execute directly. The codes are strings of 0s and 1s, or binary
digits (“bits”), which are frequently converted both from and to
hexadecimal (base 16) for human viewing and modification. Machine
language instructions typically use some bits to represent operations,
such as addition, and some to represent operands, or perhaps the
location of the next instruction. Machine language is difficult to read
and write, since it does not resemble conventional mathematical
notation or human language, and its codes vary from computer to
computer.
High level languages
 High level languages are written in a form that is close to our
human language, enabling to programmer to just focus on the
problem being solved.
 No particular knowledge of the hardware is needed as high level
languages create programs that are portable and not tied to a
particular computer or microchip.
 Examples include: C++, Java, Pascal, Python, Visual Basic.
Low level languages
Low level languages are used to write programs that
relate to the specific architecture and hardware of a
particular type of computer.
They are closer to the native language of a computer
(binary), making them harder for programmers to
understand.
Examples of low level language:
Assembly Language, Machine Code
High Level Language Low Level Language
1. It is programmer friendly language. It is a machine friendly language.
2.
High level language is less memory
efficient. Low level language is high memory efficient.
3. It is easy to understand. It is tough to understand.
4. It is simple to debug. It is complex to debug comparatively.
5. It is simple to maintain. It is complex to maintain comparatively.
6. It is portable. It is non-portable.
COBOL
 COBOL (COmmon Business Oriented Language) was developed in the late
1950s by computer manufacturers, the U.S. government and industrial computer
users. COBOL is used for commercial applications that require precise and
efficient manipulation of large amounts of data. Much business software is still
programmed in COBOL.
FORTRAN
 The first important algorithmic language was FORTRAN (formula
translation), designed in 1957 by an IBM team led by John Backus. It
was intended for scientific computations with real numbers and
collections of them organized as one- or multidimensional arrays. Its
control structures included conditional IF statements, repetitive loops
(so-called DO loops), and a GOTO statement that allowed
nonsequential execution of program code. FORTRAN made it
convenient to have subprograms for common mathematical
operations, and built libraries of them.
 FORTRAN was also designed to translate into efficient machine
language. It was immediately successful and continues to evolve.
BASIC
 BASIC (beginner’s all-purpose symbolic instruction code) was
designed at Dartmouth College in the mid-1960s by John Kemeny and
Thomas Kurtz. It was intended to be easy to learn by novices,
particularly non-computer science majors, and to run well on a time-
sharing computer with many users. It had simple data structures and
notation and it was interpreted: a BASIC program was translated line-
by-line and executed as it was translated, which made it easy to locate
programming errors.
 Its small size and simplicity also made BASIC a popular language for
early personal computers. Its recent forms have adopted many of the
data and control structures of other contemporary languages, which
makes it more powerful but less convenient for beginners.
Java
 In the early 1990s, Java was designed by Sun Microsystems, Inc., as a
programming language for the World Wide Web (WWW). Although it
resembled C++ in appearance, it was fully object-oriented. In
particular, Java dispensed with lower-level features, including the
ability to manipulate data addresses, a capability that is neither
desirable nor useful in programs for distributed systems. In order to be
portable, Java programs are translated by a Java Virtual Machine
specific to each computer platform, which then executes the Java
program. In addition to adding interactive capabilities to the Internet
through Web “applets,” Java has been widely used for programming
small and portable devices, such as mobile telephones.
C
 C, computer programming language developed in the early 1970s by
American computer scientist Dennis M. Ritchie at Bell Laboratories (formerly
AT&T Bell Laboratories).
 C was designed as a minimalist language to be used in writing operating
systems for minicomputers, such as the DEC PDP 7, which had very limited
memories compared with the mainframe computers of the period.
 The language was devised during 1969–73, alongside the early development
of the UNIX operating system. It was based on CPL (Combined Programming
Language), which had been first condensed into the B programming
language—a stripped-down computer programming language—created in
1969–70 by Ken Thompson, an American computer scientist and a colleague
of Ritchie. Ritchie subsequently rewrote and restored features from CPL to
create C, eventually rewriting the UNIX operating system in the new
language.
Variables
 Variables are used to store information to be referenced and manipulated in a computer program.
They also provide a way of labeling data with a descriptive name, so our programs can be understood
more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold
information. Their sole purpose is to label and store data in memory. This data can then be used
throughout your program.
 For example, assume you want to store two values 10 and 20 in your program and at a later stage,
you want to use these two values. Let's see how you will do it. Here are the following three simple
steps −
 Create variables with appropriate names.
 Store your values in those two variables.
 Retrieve and use the stored values from the variables.
 Creating variables
 Creating variables is also called declaring variables in C programming. Different programming
languages have different ways of creating variables inside a program. For example, C programming
has the following simple way of creating variables −
Variables
 #include <stdio.h>
 int main() {
 int a;
 int b;
 The above program creates two variables to reserve two memory
locations with names a and b. We created these variables
using int keyword to specify variable data type which means we want
to store integer values in these two variables.
Character
Every letter, digit, and punctuation mark is
a character. There are also many characters
that are invisible on screen, such as
the space, tab, and carriage-return characters.
Strings
The technical description of a String is: an
array of characters. The informal view of a
string is a sentence. Strings are almost always
written in code as a quoted sequence of
characters, i.e., "this is a string".
String
Most programming languages have a data type called a string,
which is used for data values that are made up of ordered
sequences of characters, such as "hello world". A string can
contain any sequence of characters, visible or invisible, and
characters may be repeated. The number of characters in the
string is called its length, and "hello world" has length 11 - made
up of 10 letters and 1 space. There is usually a restriction on the
maximum length of a string. There is also such a thing as
an empty string, which contains no characters - length 0.
A string can be a constant or variable. If it is a constant, it is
usually written as a sequence of characters enclosed in single or
double quotation marks, ie 'hello' or "hello".
Statement
 Most programming languages have the concept of a statement.
A statement is a command that the programmer gives to the computer. For
example:
 print "Hello, world!"
 This command has a verb (“print”) and other details (what to print). In this
case, the command print means “show on the screen,” not “print on the
printer.” The programmer either gives the statement directly to the computer
(by typing it while launching a special program), or creates a text file with the
command in it. You could create a file called “hi.txt” using a program like
Notepad, put the above command in it, and give the file to the computer.
Statement
 An instruction written in a high-level language. A statement directs the
computer to perform a specified action. A single statement in a high-
level language can represent several machine-language instructions.
Programs consist of statements and expressions. An expression is a
group of symbols that represent a value.
Operators and operands
 Operators are special symbols that represent computations like addition and multiplication.
The values the operator uses are called operands.
 The following are all legal Python expressions whose meaning is more or less clear:
 20+32 hour-1 hour*60+minute minute/60 5**2 (5+9)*(15-7)
 The symbols +, -, and /, and the use of parenthesis for grouping, mean in Python what they
mean in mathematics. The asterisk (*) is the symbol for multiplication, and ** is the symbol for
exponentiation.
 When a variable name appears in the place of an operand, it is replaced with its value before
the operation is performed.
computerprogramminglanguages-201216152310.pptx

Weitere ähnliche Inhalte

Ähnlich wie computerprogramminglanguages-201216152310.pptx

C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
Rajeshkumar Reddy
 
Computer programming
Computer programmingComputer programming
Computer programming
Suneel Dogra
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
Justine Dela Serna
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
salmankhan570
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
Tech
 

Ähnlich wie computerprogramminglanguages-201216152310.pptx (20)

all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
 
Programming Fundamentals lecture 2
Programming Fundamentals lecture 2Programming Fundamentals lecture 2
Programming Fundamentals lecture 2
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Computer program, computer languages, computer software
Computer program, computer languages, computer softwareComputer program, computer languages, computer software
Computer program, computer languages, computer software
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
Lecture_1_Introduction_to_Programming.pptx
Lecture_1_Introduction_to_Programming.pptxLecture_1_Introduction_to_Programming.pptx
Lecture_1_Introduction_to_Programming.pptx
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
 
Computer languages and generation
Computer languages and generationComputer languages and generation
Computer languages and generation
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Introduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptxIntroduction Programming and Application Lecture 1.pptx
Introduction Programming and Application Lecture 1.pptx
 
Fundamentals of programming and problem solving
Fundamentals of programming and problem solvingFundamentals of programming and problem solving
Fundamentals of programming and problem solving
 
C programme presentation
C programme presentationC programme presentation
C programme presentation
 
Software Concepts Notes
Software Concepts NotesSoftware Concepts Notes
Software Concepts Notes
 
df
dfdf
df
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Lesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptxLesson 1-3 Fundamentals of Programming.pptx
Lesson 1-3 Fundamentals of Programming.pptx
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
 
Introduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem AnsariIntroduction to Programming Concepts By Aamir Saleem Ansari
Introduction to Programming Concepts By Aamir Saleem Ansari
 

Mehr von Subramanian Mani

Mehr von Subramanian Mani (20)

Testing and Evaluation System in Higher Education.pptx
Testing and Evaluation System in Higher Education.pptxTesting and Evaluation System in Higher Education.pptx
Testing and Evaluation System in Higher Education.pptx
 
Functions of Gestural Semantics in Contemporary Communication
Functions of Gestural Semantics in Contemporary CommunicationFunctions of Gestural Semantics in Contemporary Communication
Functions of Gestural Semantics in Contemporary Communication
 
Forensic stylistics history, methods and applicadtionsand
Forensic stylistics history, methods and applicadtionsandForensic stylistics history, methods and applicadtionsand
Forensic stylistics history, methods and applicadtionsand
 
body languages.pptx
body languages.pptxbody languages.pptx
body languages.pptx
 
translation scope.pptx
translation scope.pptxtranslation scope.pptx
translation scope.pptx
 
types_of_computers.pptx
types_of_computers.pptxtypes_of_computers.pptx
types_of_computers.pptx
 
non verbal communication.pptx
non verbal communication.pptxnon verbal communication.pptx
non verbal communication.pptx
 
X bar Syntax.pptx
X bar Syntax.pptxX bar Syntax.pptx
X bar Syntax.pptx
 
word sense, notions.pptx
word sense, notions.pptxword sense, notions.pptx
word sense, notions.pptx
 
Testing and Evaluation Strategies in Second Language Teaching.pptx
Testing and Evaluation Strategies in Second Language Teaching.pptxTesting and Evaluation Strategies in Second Language Teaching.pptx
Testing and Evaluation Strategies in Second Language Teaching.pptx
 
nlp (1).pptx
nlp (1).pptxnlp (1).pptx
nlp (1).pptx
 
online assessment during covid19 .pptx
online assessment during covid19 .pptxonline assessment during covid19 .pptx
online assessment during covid19 .pptx
 
verb_and_head_movement.ppt
verb_and_head_movement.pptverb_and_head_movement.ppt
verb_and_head_movement.ppt
 
scopeoftranslationtechnologiesinindusstry5-201014031459.pptx
scopeoftranslationtechnologiesinindusstry5-201014031459.pptxscopeoftranslationtechnologiesinindusstry5-201014031459.pptx
scopeoftranslationtechnologiesinindusstry5-201014031459.pptx
 
verb movements.ppt
verb movements.pptverb movements.ppt
verb movements.ppt
 
Motivation, Gender Culture and Achievement,.pptx
Motivation, Gender Culture and Achievement,.pptxMotivation, Gender Culture and Achievement,.pptx
Motivation, Gender Culture and Achievement,.pptx
 
Tree Adjoining Grammar.pptx
Tree Adjoining Grammar.pptxTree Adjoining Grammar.pptx
Tree Adjoining Grammar.pptx
 
Minimalism.pptx
Minimalism.pptxMinimalism.pptx
Minimalism.pptx
 
Methods and Theories of Languaage learning.pptx
Methods and Theories of Languaage learning.pptxMethods and Theories of Languaage learning.pptx
Methods and Theories of Languaage learning.pptx
 
LFG and GPSG.pptx
LFG and GPSG.pptxLFG and GPSG.pptx
LFG and GPSG.pptx
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 

computerprogramminglanguages-201216152310.pptx

  • 2. Computer programming language Programming languages are used for expressing a set of detailed instructions for a digital computer. Such instructions can be executed directly when they are in the computer manufacturer-specific numerical form known as machine language, after a simple substitution process when expressed in a corresponding assembly language, or after translation from some “higher-level” language.
  • 3.
  • 4. Assembly language Assembly language is one level above machine language. It uses short mnemonic codes for instructions and allows the programmer to introduce names for blocks of memory that hold data. One might thus write “add pay, total” instead of “0110101100101000” for an instruction that adds two numbers.
  • 5. Machine language  The numeric codes for the operations that a particular computer can execute directly. The codes are strings of 0s and 1s, or binary digits (“bits”), which are frequently converted both from and to hexadecimal (base 16) for human viewing and modification. Machine language instructions typically use some bits to represent operations, such as addition, and some to represent operands, or perhaps the location of the next instruction. Machine language is difficult to read and write, since it does not resemble conventional mathematical notation or human language, and its codes vary from computer to computer.
  • 6. High level languages  High level languages are written in a form that is close to our human language, enabling to programmer to just focus on the problem being solved.  No particular knowledge of the hardware is needed as high level languages create programs that are portable and not tied to a particular computer or microchip.  Examples include: C++, Java, Pascal, Python, Visual Basic.
  • 7. Low level languages Low level languages are used to write programs that relate to the specific architecture and hardware of a particular type of computer. They are closer to the native language of a computer (binary), making them harder for programmers to understand. Examples of low level language: Assembly Language, Machine Code
  • 8. High Level Language Low Level Language 1. It is programmer friendly language. It is a machine friendly language. 2. High level language is less memory efficient. Low level language is high memory efficient. 3. It is easy to understand. It is tough to understand. 4. It is simple to debug. It is complex to debug comparatively. 5. It is simple to maintain. It is complex to maintain comparatively. 6. It is portable. It is non-portable.
  • 9. COBOL  COBOL (COmmon Business Oriented Language) was developed in the late 1950s by computer manufacturers, the U.S. government and industrial computer users. COBOL is used for commercial applications that require precise and efficient manipulation of large amounts of data. Much business software is still programmed in COBOL.
  • 10. FORTRAN  The first important algorithmic language was FORTRAN (formula translation), designed in 1957 by an IBM team led by John Backus. It was intended for scientific computations with real numbers and collections of them organized as one- or multidimensional arrays. Its control structures included conditional IF statements, repetitive loops (so-called DO loops), and a GOTO statement that allowed nonsequential execution of program code. FORTRAN made it convenient to have subprograms for common mathematical operations, and built libraries of them.  FORTRAN was also designed to translate into efficient machine language. It was immediately successful and continues to evolve.
  • 11. BASIC  BASIC (beginner’s all-purpose symbolic instruction code) was designed at Dartmouth College in the mid-1960s by John Kemeny and Thomas Kurtz. It was intended to be easy to learn by novices, particularly non-computer science majors, and to run well on a time- sharing computer with many users. It had simple data structures and notation and it was interpreted: a BASIC program was translated line- by-line and executed as it was translated, which made it easy to locate programming errors.  Its small size and simplicity also made BASIC a popular language for early personal computers. Its recent forms have adopted many of the data and control structures of other contemporary languages, which makes it more powerful but less convenient for beginners.
  • 12. Java  In the early 1990s, Java was designed by Sun Microsystems, Inc., as a programming language for the World Wide Web (WWW). Although it resembled C++ in appearance, it was fully object-oriented. In particular, Java dispensed with lower-level features, including the ability to manipulate data addresses, a capability that is neither desirable nor useful in programs for distributed systems. In order to be portable, Java programs are translated by a Java Virtual Machine specific to each computer platform, which then executes the Java program. In addition to adding interactive capabilities to the Internet through Web “applets,” Java has been widely used for programming small and portable devices, such as mobile telephones.
  • 13. C  C, computer programming language developed in the early 1970s by American computer scientist Dennis M. Ritchie at Bell Laboratories (formerly AT&T Bell Laboratories).  C was designed as a minimalist language to be used in writing operating systems for minicomputers, such as the DEC PDP 7, which had very limited memories compared with the mainframe computers of the period.  The language was devised during 1969–73, alongside the early development of the UNIX operating system. It was based on CPL (Combined Programming Language), which had been first condensed into the B programming language—a stripped-down computer programming language—created in 1969–70 by Ken Thompson, an American computer scientist and a colleague of Ritchie. Ritchie subsequently rewrote and restored features from CPL to create C, eventually rewriting the UNIX operating system in the new language.
  • 14. Variables  Variables are used to store information to be referenced and manipulated in a computer program. They also provide a way of labeling data with a descriptive name, so our programs can be understood more clearly by the reader and ourselves. It is helpful to think of variables as containers that hold information. Their sole purpose is to label and store data in memory. This data can then be used throughout your program.  For example, assume you want to store two values 10 and 20 in your program and at a later stage, you want to use these two values. Let's see how you will do it. Here are the following three simple steps −  Create variables with appropriate names.  Store your values in those two variables.  Retrieve and use the stored values from the variables.  Creating variables  Creating variables is also called declaring variables in C programming. Different programming languages have different ways of creating variables inside a program. For example, C programming has the following simple way of creating variables −
  • 15. Variables  #include <stdio.h>  int main() {  int a;  int b;  The above program creates two variables to reserve two memory locations with names a and b. We created these variables using int keyword to specify variable data type which means we want to store integer values in these two variables.
  • 16. Character Every letter, digit, and punctuation mark is a character. There are also many characters that are invisible on screen, such as the space, tab, and carriage-return characters.
  • 17. Strings The technical description of a String is: an array of characters. The informal view of a string is a sentence. Strings are almost always written in code as a quoted sequence of characters, i.e., "this is a string".
  • 18. String Most programming languages have a data type called a string, which is used for data values that are made up of ordered sequences of characters, such as "hello world". A string can contain any sequence of characters, visible or invisible, and characters may be repeated. The number of characters in the string is called its length, and "hello world" has length 11 - made up of 10 letters and 1 space. There is usually a restriction on the maximum length of a string. There is also such a thing as an empty string, which contains no characters - length 0. A string can be a constant or variable. If it is a constant, it is usually written as a sequence of characters enclosed in single or double quotation marks, ie 'hello' or "hello".
  • 19. Statement  Most programming languages have the concept of a statement. A statement is a command that the programmer gives to the computer. For example:  print "Hello, world!"  This command has a verb (“print”) and other details (what to print). In this case, the command print means “show on the screen,” not “print on the printer.” The programmer either gives the statement directly to the computer (by typing it while launching a special program), or creates a text file with the command in it. You could create a file called “hi.txt” using a program like Notepad, put the above command in it, and give the file to the computer.
  • 20. Statement  An instruction written in a high-level language. A statement directs the computer to perform a specified action. A single statement in a high- level language can represent several machine-language instructions. Programs consist of statements and expressions. An expression is a group of symbols that represent a value.
  • 21. Operators and operands  Operators are special symbols that represent computations like addition and multiplication. The values the operator uses are called operands.  The following are all legal Python expressions whose meaning is more or less clear:  20+32 hour-1 hour*60+minute minute/60 5**2 (5+9)*(15-7)  The symbols +, -, and /, and the use of parenthesis for grouping, mean in Python what they mean in mathematics. The asterisk (*) is the symbol for multiplication, and ** is the symbol for exponentiation.  When a variable name appears in the place of an operand, it is replaced with its value before the operation is performed.