尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
 Here is a man dumbo which do not perform task
by himself. So we have to give him command and
then he will perform it.
 Similarly , the computer also can’t perform task by
himself until we give him some set of instruction
to perform(command).
 So, computer take some INPUT form user perform
some COMPUTATION then give useful
INFORMATION or DATA.
COMPARING DUMBO WITH
COMPUTER :
#include <iostream>
using namespace std;
int main()
{
/* program code */
return 0;
}
A modern-style C++ program that uses the new-style
headers and a namespace -
#include <iostream>
using namespace std;
int main()
{
/* program code */
return 0;
}
 The new-style headers do not specify filenames.
 They simply specify standard identifiers that might
be mapped to files by the compiler, but they need
not be.
 <iostream>
 <vector>
 <string>, not related with <string.h>
 <cmath>, C++ version of <math.h>
 <cstring>, C++ version of <string.h>
 Programmer defined header files should end in “.h”.
•Computer consist of:
•Main Memory
•Registers
•ALU
•Input
•Output devices
•Disk
•Bus ,etc .
•NOTE: The data is always copied if we take any variable (data)
and perform some operation on it. So there will we always a
GARBAGE VALUE present at address or memory location.
•Computer uses only binary language to perform ANY task or to
store any data.
 In c++ we can use int data type to store a integer
value.
 Int uses 4 byte or 2 byte to store data.
 There are some data type which are used with in to
store data which required less or more storage,
they are:
 Short-2byte
 long-8byte
 unsigned-numbers with positive values only.
 Range = -2^31 to 2^31-1
Example: data type – int – size=4byte(32bits)
Formula:
1.)For signed -2^n to 2^n-1 .
2.)For unsigned 0 to 2^2n -1 .
Here n=number of bits.
n= 32,
-2^32 to 2^32-1 or
0 to 2^64-1 .
•In computer the signed interger is stored in
the form of binary numbers.
•The positive numbers from 0 to infinity the
number will be in its complement form.
• The MSB will 0 for positive and 1 for
negative.
•The remaining part of negative number will be
in its 2’s complement.
1. If the number is starting with 0 then the
number will be in octal.
2. If the number is starting with 0x then the
number will be in hexadecimal.
3. We can define a constant by using const.
•To represent floating numbers in c++ the float
and double data types are used .
•Float – 4byte – 7 digits.
•Double – 8byte – 15 digits.
•To represent string there are three data types
available in c++, they are:
•1. string
•2. char
•3. bool (true or false).
•For every character there is a ASCII value
•E.g. : ‘A’=65 , ‘a’ =97 , ‘0’ =48 etc.
•Range of char= 0 to 255.
•E.g. : char x=‘a’ ;
•In string data type the string “harsh” will be
stored in the from of array .
•E.g. : string =“HARSH”;
•Also,
•E.g. : char arr[6]=“HARSH”;
•Here ‘0’ is the NULL string which signify the
end of the string.
•In boolean, bool data type store only true-1 or
false-0.
H A R S H 0
#include directives
int main()
{
constant declarations;
variable declarations;
executable statements;
return 0;
}
•Compiler directive or Header file : Instruction
to compiler used when compiling our program
to machine language.
•For e.g. iostream , math, etc.
•Using namespace std : every declaration in the
program is stored in a namespace called “std”.
•E.g. std:: name; if declaration is of name.
•We can also our own namespace , when
required.
•Is state that the value(result) of arithmetic
operation depend on more expressive variable.
•E.g. : float a,b;
c=a+b; will be float.
c=a-b; will be float.
c=a/b; will be float……..,etc.
Similarly, 2-2.0 will be float.
Precedence : Operator :
1. ( )
2. *
3. + or -
4. / or %
NOTE : Do not use [] or {} rather than of ().
E.g. : a+b*c/d-e == (a+((b*c)/d))-e
 Escape character ----- ‘’.
•It is use to escape the use of a character if we
put ‘’ in front of a character then the value is
escaped.
•Like if we want to print “ on console then we
have to use ” .
•Similarly ,  ,etc.
•Also to print % on console we have to use
%%.
Precedence : Operators:
1. !
2. < , <= , > , >=
3. == , !=
4. &&
5. ||
•In for( ) or while( ) loop : if there is nothing
then it will assume 1 means it will run the
content of for or while loop.
•For E.g. for(i =0 ; ; i++) ,while( ) ,etc.
•In C++, we can use static members inside a
structure i.e., struct .
•We can also print the address on printf
statement like, printf(“%p”, ” hello world”);
This will print the address on the string.
c++

More Related Content

What's hot

(02) c sharp_tutorial
(02) c sharp_tutorial(02) c sharp_tutorial
(02) c sharp_tutorial
Satish Verma
 
Managing console input
Managing console inputManaging console input
Managing console input
rajshreemuthiah
 
Managing I/O & String function in C
Managing I/O & String function in CManaging I/O & String function in C
Managing I/O & String function in C
Abinaya B
 
C++:Lab 2
 C++:Lab 2 C++:Lab 2
C++:Lab 2
سلمى شطا
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdf
ayush616992
 
Basic concept of c++
Basic concept of c++Basic concept of c++
Basic concept of c++
shashikant pabari
 
Programming in c
Programming in cProgramming in c
Programming in c
vinothinisureshbabu
 
String C Programming
String C ProgrammingString C Programming
String C Programming
Prionto Abdullah
 
C programming - String
C programming - StringC programming - String
C programming - String
Achyut Devkota
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
TAlha MAlik
 
Encoders and types of encodrs
Encoders and types of encodrs Encoders and types of encodrs
Encoders and types of encodrs
Easy n Inspire L
 
C++
C++C++
C programming Tutorial Session 1
C programming Tutorial Session 1C programming Tutorial Session 1
C programming Tutorial Session 1
Muhammad Ehtisham Siddiqui
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
Saifur Rahman
 
C string
C stringC string
String functions in C
String functions in CString functions in C
string in C
string in Cstring in C
Implementation Of String Functions In C
Implementation Of String Functions In CImplementation Of String Functions In C
Implementation Of String Functions In C
Fazila Sadia
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
Ahmad Idrees
 
Lecture 2. mte 407
Lecture 2. mte 407Lecture 2. mte 407
Lecture 2. mte 407
rumanatasnim415
 

What's hot (20)

(02) c sharp_tutorial
(02) c sharp_tutorial(02) c sharp_tutorial
(02) c sharp_tutorial
 
Managing console input
Managing console inputManaging console input
Managing console input
 
Managing I/O & String function in C
Managing I/O & String function in CManaging I/O & String function in C
Managing I/O & String function in C
 
C++:Lab 2
 C++:Lab 2 C++:Lab 2
C++:Lab 2
 
c++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdfc++ exp 1 Suraj...pdf
c++ exp 1 Suraj...pdf
 
Basic concept of c++
Basic concept of c++Basic concept of c++
Basic concept of c++
 
Programming in c
Programming in cProgramming in c
Programming in c
 
String C Programming
String C ProgrammingString C Programming
String C Programming
 
C programming - String
C programming - StringC programming - String
C programming - String
 
Cs1123 3 c++ overview
Cs1123 3 c++ overviewCs1123 3 c++ overview
Cs1123 3 c++ overview
 
Encoders and types of encodrs
Encoders and types of encodrs Encoders and types of encodrs
Encoders and types of encodrs
 
C++
C++C++
C++
 
C programming Tutorial Session 1
C programming Tutorial Session 1C programming Tutorial Session 1
C programming Tutorial Session 1
 
C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)C cheat sheet for varsity (extreme edition)
C cheat sheet for varsity (extreme edition)
 
C string
C stringC string
C string
 
String functions in C
String functions in CString functions in C
String functions in C
 
string in C
string in Cstring in C
string in C
 
Implementation Of String Functions In C
Implementation Of String Functions In CImplementation Of String Functions In C
Implementation Of String Functions In C
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
 
Lecture 2. mte 407
Lecture 2. mte 407Lecture 2. mte 407
Lecture 2. mte 407
 

Similar to c++

Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptx
SONU KUMAR
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteaching
eteaching
 
C++
C++C++
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.ppt
Tekle12
 
C tutorials
C tutorialsC tutorials
C tutorials
Amit Kapoor
 
C++
C++C++
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
WondimuBantihun1
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
ANUSUYA S
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
GDGKuwaitGoogleDevel
 
C notes for exam preparation
C notes for exam preparationC notes for exam preparation
C notes for exam preparation
Lakshmi Sarvani Videla
 
(8) cpp abstractions separated_compilation_and_binding_part_i
(8) cpp abstractions separated_compilation_and_binding_part_i(8) cpp abstractions separated_compilation_and_binding_part_i
(8) cpp abstractions separated_compilation_and_binding_part_i
Nico Ludwig
 
programming week 2.ppt
programming week 2.pptprogramming week 2.ppt
programming week 2.ppt
FatimaZafar68
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
Ahmad Idrees
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
Abdullah Jan
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
Widad Jamaluddin
 
C programming language
C programming languageC programming language
C programming language
Mahmoud Eladawi
 
Advanced+pointers
Advanced+pointersAdvanced+pointers
Advanced+pointers
Rubal Bansal
 
C programming language
C programming languageC programming language
C programming language
Abin Rimal
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
Anonymous9etQKwW
 

Similar to c++ (20)

Programming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptxProgramming in C by SONU KUMAR.pptx
Programming in C by SONU KUMAR.pptx
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
 
basics of C and c++ by eteaching
basics of C and c++ by eteachingbasics of C and c++ by eteaching
basics of C and c++ by eteaching
 
C++
C++C++
C++
 
CHAPTER-2.ppt
CHAPTER-2.pptCHAPTER-2.ppt
CHAPTER-2.ppt
 
C tutorials
C tutorialsC tutorials
C tutorials
 
C++
C++C++
C++
 
Chapter1.pptx
Chapter1.pptxChapter1.pptx
Chapter1.pptx
 
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
C++ Unit 1PPT which contains the Introduction and basic o C++ with OOOps conc...
 
#Code2 create c++ for beginners
#Code2 create  c++ for beginners #Code2 create  c++ for beginners
#Code2 create c++ for beginners
 
C notes for exam preparation
C notes for exam preparationC notes for exam preparation
C notes for exam preparation
 
(8) cpp abstractions separated_compilation_and_binding_part_i
(8) cpp abstractions separated_compilation_and_binding_part_i(8) cpp abstractions separated_compilation_and_binding_part_i
(8) cpp abstractions separated_compilation_and_binding_part_i
 
programming week 2.ppt
programming week 2.pptprogramming week 2.ppt
programming week 2.ppt
 
Basics of c++ Programming Language
Basics of c++ Programming LanguageBasics of c++ Programming Language
Basics of c++ Programming Language
 
Programming using c++ tool
Programming using c++ toolProgramming using c++ tool
Programming using c++ tool
 
Chap 2 c++
Chap 2 c++Chap 2 c++
Chap 2 c++
 
C programming language
C programming languageC programming language
C programming language
 
Advanced+pointers
Advanced+pointersAdvanced+pointers
Advanced+pointers
 
C programming language
C programming languageC programming language
C programming language
 
lecture 2.pptx
lecture 2.pptxlecture 2.pptx
lecture 2.pptx
 

Recently uploaded

Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
yogita singh$A17
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
ShurooqTaib
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Balvir Singh
 
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdfFUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
EMERSON EDUARDO RODRIGUES
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Tsuyoshi Horigome
 
Microsoft Azure AD architecture and features
Microsoft Azure AD architecture and featuresMicrosoft Azure AD architecture and features
Microsoft Azure AD architecture and features
ssuser381403
 
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
dABGO KI CITy kUSHINAGAR Ak47
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
Lubi Valves
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
gapboxn
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Dr.Costas Sachpazis
 
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASICINTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
GOKULKANNANMMECLECTC
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
yakranividhrini
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
felixwold
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
hotchicksescort
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
Guangdong Ctube Industry Co., Ltd.
 
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
nainakaoornoida
 
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
sexytaniya455
 
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptxMODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
NaveenNaveen726446
 
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
simrangupta87541
 

Recently uploaded (20)

Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl LucknowCall Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
Call Girls In Lucknow 🔥 +91-7014168258🔥High Profile Call Girl Lucknow
 
paper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdfpaper relate Chozhavendhan et al. 2020.pdf
paper relate Chozhavendhan et al. 2020.pdf
 
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdfSri Guru Hargobind Ji - Bandi Chor Guru.pdf
Sri Guru Hargobind Ji - Bandi Chor Guru.pdf
 
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdfFUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
FUNDAMENTALS OF MECHANICAL ENGINEERING.pdf
 
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
Update 40 models( Solar Cell ) in SPICE PARK(JUL2024)
 
Microsoft Azure AD architecture and features
Microsoft Azure AD architecture and featuresMicrosoft Azure AD architecture and features
Microsoft Azure AD architecture and features
 
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
High Profile Call Girls Ahmedabad 🔥 7737669865 🔥 Real Fun With Sexual Girl Av...
 
Butterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdfButterfly Valves Manufacturer (LBF Series).pdf
Butterfly Valves Manufacturer (LBF Series).pdf
 
一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理一比一原版(UO毕业证)渥太华大学毕业证如何办理
一比一原版(UO毕业证)渥太华大学毕业证如何办理
 
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
Sachpazis_Consolidation Settlement Calculation Program-The Python Code and th...
 
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASICINTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
INTRODUCTION TO ARTIFICIAL INTELLIGENCE BASIC
 
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort ServiceCuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
Cuttack Call Girls 💯Call Us 🔝 7374876321 🔝 💃 Independent Female Escort Service
 
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdfAsymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
Asymmetrical Repulsion Magnet Motor Ratio 6-7.pdf
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
❣Unsatisfied Bhabhi Call Girls Surat 💯Call Us 🔝 7014168258 🔝💃Independent Sura...
 
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC ConduitThe Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
The Differences between Schedule 40 PVC Conduit Pipe and Schedule 80 PVC Conduit
 
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
❣Independent Call Girls Chennai 💯Call Us 🔝 7737669865 🔝💃Independent Chennai E...
 
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
Call Girls Nagpur 8824825030 Escort In Nagpur service 24X7
 
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptxMODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
MODULE 5 BIOLOGY FOR ENGINEERS TRENDS IN BIO ENGINEERING.pptx
 
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
Mahipalpur Call Girls Delhi 🔥 9711199012 ❄- Pick Your Dream Call Girls with 1...
 

c++

  • 1.
  • 2.
  • 3.  Here is a man dumbo which do not perform task by himself. So we have to give him command and then he will perform it.  Similarly , the computer also can’t perform task by himself until we give him some set of instruction to perform(command).  So, computer take some INPUT form user perform some COMPUTATION then give useful INFORMATION or DATA. COMPARING DUMBO WITH COMPUTER :
  • 4. #include <iostream> using namespace std; int main() { /* program code */ return 0; }
  • 5. A modern-style C++ program that uses the new-style headers and a namespace - #include <iostream> using namespace std; int main() { /* program code */ return 0; }
  • 6.  The new-style headers do not specify filenames.  They simply specify standard identifiers that might be mapped to files by the compiler, but they need not be.  <iostream>  <vector>  <string>, not related with <string.h>  <cmath>, C++ version of <math.h>  <cstring>, C++ version of <string.h>  Programmer defined header files should end in “.h”.
  • 7.
  • 8. •Computer consist of: •Main Memory •Registers •ALU •Input •Output devices •Disk •Bus ,etc . •NOTE: The data is always copied if we take any variable (data) and perform some operation on it. So there will we always a GARBAGE VALUE present at address or memory location. •Computer uses only binary language to perform ANY task or to store any data.
  • 9.  In c++ we can use int data type to store a integer value.  Int uses 4 byte or 2 byte to store data.  There are some data type which are used with in to store data which required less or more storage, they are:  Short-2byte  long-8byte  unsigned-numbers with positive values only.  Range = -2^31 to 2^31-1
  • 10. Example: data type – int – size=4byte(32bits) Formula: 1.)For signed -2^n to 2^n-1 . 2.)For unsigned 0 to 2^2n -1 . Here n=number of bits. n= 32, -2^32 to 2^32-1 or 0 to 2^64-1 .
  • 11. •In computer the signed interger is stored in the form of binary numbers. •The positive numbers from 0 to infinity the number will be in its complement form. • The MSB will 0 for positive and 1 for negative. •The remaining part of negative number will be in its 2’s complement.
  • 12. 1. If the number is starting with 0 then the number will be in octal. 2. If the number is starting with 0x then the number will be in hexadecimal. 3. We can define a constant by using const.
  • 13. •To represent floating numbers in c++ the float and double data types are used . •Float – 4byte – 7 digits. •Double – 8byte – 15 digits.
  • 14.
  • 15. •To represent string there are three data types available in c++, they are: •1. string •2. char •3. bool (true or false). •For every character there is a ASCII value •E.g. : ‘A’=65 , ‘a’ =97 , ‘0’ =48 etc. •Range of char= 0 to 255. •E.g. : char x=‘a’ ;
  • 16. •In string data type the string “harsh” will be stored in the from of array . •E.g. : string =“HARSH”; •Also, •E.g. : char arr[6]=“HARSH”; •Here ‘0’ is the NULL string which signify the end of the string. •In boolean, bool data type store only true-1 or false-0. H A R S H 0
  • 17. #include directives int main() { constant declarations; variable declarations; executable statements; return 0; }
  • 18. •Compiler directive or Header file : Instruction to compiler used when compiling our program to machine language. •For e.g. iostream , math, etc. •Using namespace std : every declaration in the program is stored in a namespace called “std”. •E.g. std:: name; if declaration is of name. •We can also our own namespace , when required.
  • 19. •Is state that the value(result) of arithmetic operation depend on more expressive variable. •E.g. : float a,b; c=a+b; will be float. c=a-b; will be float. c=a/b; will be float……..,etc. Similarly, 2-2.0 will be float.
  • 20. Precedence : Operator : 1. ( ) 2. * 3. + or - 4. / or % NOTE : Do not use [] or {} rather than of (). E.g. : a+b*c/d-e == (a+((b*c)/d))-e
  • 21.  Escape character ----- ‘’. •It is use to escape the use of a character if we put ‘’ in front of a character then the value is escaped. •Like if we want to print “ on console then we have to use ” . •Similarly , ,etc. •Also to print % on console we have to use %%.
  • 22. Precedence : Operators: 1. ! 2. < , <= , > , >= 3. == , != 4. && 5. ||
  • 23. •In for( ) or while( ) loop : if there is nothing then it will assume 1 means it will run the content of for or while loop. •For E.g. for(i =0 ; ; i++) ,while( ) ,etc. •In C++, we can use static members inside a structure i.e., struct . •We can also print the address on printf statement like, printf(“%p”, ” hello world”); This will print the address on the string.
  翻译: