Comparison between C and C++

muhammadmohsin255776 109 views 11 slides Mar 11, 2023
Slide 1
Slide 1 of 11
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11

About This Presentation

Comparison Between C and C++
There Syntax
Main Points


Slide Content

LOADING .... ICT Project Touch Screen

Muhammad Mohsin :03-134222-070 Murtaza Alam :03-134222-086 Syed Zain-ul-Abideen:03-134222-106 Ibrahim :03-134222-106 Group Members

Similarities between c and c++ Code structure of both the language are same. The compilation of both the language are similar. Thy share the same basic syntax .Nearly all of C’ operators and keywords are also present in c++ and do the same thing.

C++ has the slightly extended grammer than C, but the basic grammer are same. Basic memory Model of both is very close to the hardware. Same notions of sack, heak , file scope and static variables is present in both languages

Uses of c++ C++ (or “C-plus-plus”) is a general-purpose programming and coding language. C++ is used in developing browsers, operating systems, and applications, as well as in-game programming, software engineering, data structures, etc.

DIFFERENCES BETWEEN C LANGUAGE AND C++ C LANGUAGE C language support function programing . C is a middle level Language IN C Language :- Scanf ()--- Used for input. Printf ()--- Used for Output. C++ LANGUAGE C++support OOPS(Object Oriented Programming language) concept. C++ is the high level Language In C++ Language:- Cin >>--- Used for input. Cout << --- Used for output.

In C we can not use inheritance. File extension C is .C. C is a subset of C++. C follows the top-down approach. C does not support function overloading. C programs are divided into procedures and modules. C doesn't have provide the feature of namespace But, In C++ we can use inheritance. File extension C++ is .CPP. C++ is a superset of C. C++ follows the bottom-up approach. C++ support function overloading. Ok thanks C++ program are divided into function and class C++ support the feature of namespace

C - language

C++ LANGUAGE

Code of C language

Code of C++ Language