0% found this document useful (0 votes)
9 views6 pages

5-Lecture-PF-Intro To C++

C++ is a general-purpose programming language developed by Bjarne Stroustrup in 1983 as an extension of C, incorporating object-oriented programming features. It supports multiple platforms and is used in various applications, including system programming and performance-critical software. The document also highlights syntax differences between C and C++, particularly in input and output operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views6 pages

5-Lecture-PF-Intro To C++

C++ is a general-purpose programming language developed by Bjarne Stroustrup in 1983 as an extension of C, incorporating object-oriented programming features. It supports multiple platforms and is used in various applications, including system programming and performance-critical software. The document also highlights syntax differences between C and C++, particularly in input and output operations.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Programing Fundamentals

Introduction to C++
History of C++
 In 1979 Bjarne Stroustrup started working on C language to make it object
oriented .

 He was inspired from the languages called SIMULA(A computer language used
for simulation ) which was a Object Oriented Programing Language.

 After that C was named as “C with Classes”.

 In 1983 C with classes was named as C++

 Here ++ indicates increment in C


Introduction to C language
 C++ is general purpose programing language developed by Bjarne Stroustrup in
1983.
 C++ is a superset/extension of C language.
 It has extension “.cpp”
 C++ fully supports object-oriented programming, including the four pillars of
object-oriented development:

❑Encapsulation
❑Data hiding
❑Inheritance
❑Polymorphism
Introduction to C language(Continued…)
 C++ is supports variety of platforms like windows, Mac, Unix

 It is designed with a bias toward system programming

 (e.g., for use in embedded systems or operating system kernels)

 C++ has also been found useful in many other contexts, including desktop
applications, servers

 (e.g. e-commerce, web search or SQL servers), performance-critical applications


(e.g. telephone switches ), and entertainment softwares.
Input Output syntax in C & C++
C C++

 print(“Hello World!”);  cout<<“Hello World!”;


 printf(“Hello world! \n”);  cout<<“Hello world”<<endl;
 printf(“%i”,a);  cout<<a;
 printf(“%i”,a+b);  cout<<a+b;
 printf(“%i %i”,a,b)  cout<<a<<b;
 scanf(“%i”,&a);  cin>>a;
 scanf(“%i %i”,&a,&b);  cin>>a>>b;
Syntax Difference in C & C++ program
Stands for input
A simple C program output stream A simple C++ program

#include<stdio.h> #include<iostream>
int main() Using namespace std;
int main()
{
{
printf(“hello this c program”); cout<<“Hello this is C++ Program”;
retrun 0; return 0;
The built in C++ library routines are kept in the
standard} namespace. That includes stuff like cout, cin, }
string, vector, map, etc. Because these tools are used
Save as
so commonly, it's .c extension
popular to add "using namespace Save as .cpp extension
std" at the top of your source code so that you won't
have to type the std:: prefix constantly.

You might also like