starting c++

8
C++ IICT - Lab-7

Upload: ameer-khan

Post on 16-Apr-2017

158 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Starting c++

C++ IICT - Lab-7

Page 2: Starting c++

TABLE OF CONTENTS• Programming Languages• Levels of Programming Languages• Compiler• C++• Structure of a Simple C++ Program

Page 3: Starting c++

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

Page 4: Starting c++

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

Page 5: Starting c++

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

Page 6: Starting c++

COMPILER

#include <iostream>using namespace std;

int main(){

return 0;}

01010101011010001010101010101010101010111000101010101001100101010100001001011010101010000101010101010101010101010010101010101010101010101000

Compiler

High Level Language Machine Language

Page 7: Starting c++

• 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

Page 8: Starting c++

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