Starting c++
-
Upload
ameer-khan -
Category
Education
-
view
158 -
download
0
Transcript of Starting c++
C++ IICT - Lab-7
TABLE OF CONTENTS• Programming Languages• Levels of Programming Languages• Compiler• C++• Structure of a Simple C++ Program
PROGRAMMING LANGUAGESA programming language is a formal computer language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.Read more on Wikipedia
PROGRAMMING LANGUAGESLEVELS
•High Level LanguageMore Human UnderstandableEnglish like statements
• Assembly LanguageLess Human UnderstandableLow level language similar to machine language
•Machine LanguageComputer UnderstandableLow level language, consisting 1’s and 0’s
COMPILERA compiler is a computer program (or a set of programs) that transforms source code written in a programming language into another computer language, with the latter often being machine language.
Read more on Wikipedia
English Like LinesEasy for ProgrammerHigh Level Language
Compiler
0’s and 1’sEasy for ComputerLow Level Language
COMPILER
#include <iostream>using namespace std;
int main(){
return 0;}
01010101011010001010101010101010101010111000101010101001100101010100001001011010101010000101010101010101010101010010101010101010101010101000
Compiler
High Level Language Machine Language
• C++ is a general-purpose programming language.• C++ is standardized by the International Organization for Standardization
(ISO), with the latest standard version published December 2014 and is known as “C++14”.
• C with Classes.• C++ is a Case-Sensitive Language.Read more on Wikipedia
STRUCTURE OF C++ PROGRAM#include <iostream>using namespace std;
int main(){
cout<<“Hello World!”;return 0;
}
(Pre-Processor Directive)Header File
Blank Lines have no impact. Just Improve Readability.
Function
Return Type
Function Name
C++ Statements
End of a Statement