1 12/4/1435 h Lecture 2 Lecture 2 Programs and Programs and Programming Languages Programming Languages
1
12/4/1435 h
Lecture 2Lecture 2
Programs and Programming Programs and Programming LanguagesLanguages
2
Q:Mention the Categories of Software?1.1. System software System software 2.2. Application softwareApplication softwareQ: What is A system software?Q: What is A system software?
They are programs that They are programs that managemanage the the computer hardware and the programs that computer hardware and the programs that run on them. run on them. ExamplesExamples: operating : operating systems, utility programs, software systems, utility programs, software development toolsdevelopment tools
3
Q: What is Application software?
1.1. They are programs that provide services to They are programs that provide services to the user. Examples : word processing, the user. Examples : word processing, games, programs to solve specific games, programs to solve specific problemsproblems
4
.QQ: : Define a program?Define a program?
A program is a set of A program is a set of instructions that the instructions that the computer follows to perform computer follows to perform a taska task
5
Q: What is a Program Made of ?Q :What areQ :What are Common Common
elements in programming elements in programming languages ? :languages ? :
1.1. Key Words Key Words 2.2. Programmer-Defined IdentifiersProgrammer-Defined Identifiers3.3. OperatorsOperators4.4. Punctuation Punctuation 5.5. Syntax Syntax
6
Q:Define The Followings 1.1. Key Words:Key Words: Also known as Also known as reserved wordsreserved words Have a special meaning in C+Have a special meaning in C+
+.+. Can not be used for any other Can not be used for any other
purposepurpose
7
.
Examples of key words are : Examples of key words are :
using, namespace, int, double using, namespace, int, double and returnand return
8
Key Words
9
2. The Programmer-Defined Identifiers
Names made up by the Names made up by the programmerprogrammer
Not part of the C++ languageNot part of the C++ language Used to represent various Used to represent various
things things ex: ex: variables (memory variables (memory locations functions …...locations functions …...
10
3-Operators
1.1. Used to perform operations on Used to perform operations on datadata
2.2. Many types of operators:Many types of operators:Arithmetic - ex: +,-,*,/Arithmetic - ex: +,-,*,/Assignment – ex: =Assignment – ex: =Relational operators <,>,<=,>=Relational operators <,>,<=,>=
3.3. Some operators are : << >> Some operators are : << >>
11
Operators
12
4 –Punctuation
1.1. Characters that mark the Characters that mark the end of a statement, or that end of a statement, or that separate items in a listseparate items in a list
Example : , and ;Example : , and ;
13
Punctuation
14
5- Define Syntax
1.1. The rules that must beThe rules that must be fofollowed when writing a llowed when writing a programprogram
2.2. Controls the use of key words, Controls the use of key words, operators, programmer-operators, programmer-defined symbols, and defined symbols, and punctuationpunctuation