The document provides information about algorithms and programming fundamentals in C++. It discusses what algorithms are, how to write them, and examples of algorithms to determine if a number is even or odd or if a student passed an exam. It also covers flowcharts, programming languages, data types, variables, operators, and comments in C++.
This presentation is about the "Basics Of C++ Programming.". Anyone who wants to learn C++ programming can get basic information from this.Easy concepts for the one who wish to learn a C++ language. Its an easy programming language which is used for different purposes like softwares,OS etc..
Hope u get enough info about the basics of c++ :)
Complete C++ programming Language CourseVivek chan
This is the Complete course of C++ Programming Language for Beginners. All Topics of C++ programming Language are covered in this single power point presentation.
Visit: www.cyberlabzone.com
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
This is an overview of C++ (based on 1999 / 2003 standard) and its use in Object Oriented Programming. The presentation assumes that the audience knows C programming.
This presentation is about the "Basics Of C++ Programming.". Anyone who wants to learn C++ programming can get basic information from this.Easy concepts for the one who wish to learn a C++ language. Its an easy programming language which is used for different purposes like softwares,OS etc..
Hope u get enough info about the basics of c++ :)
Complete C++ programming Language CourseVivek chan
This is the Complete course of C++ Programming Language for Beginners. All Topics of C++ programming Language are covered in this single power point presentation.
Visit: www.cyberlabzone.com
This slide notes are more than 10 years old of my teacher Mr Karim Zebari. He uses a brilliant simple language to explain programming principles step by step.
This is an overview of C++ (based on 1999 / 2003 standard) and its use in Object Oriented Programming. The presentation assumes that the audience knows C programming.
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
Introduction
The term problem solving is used in many disciplines, sometimes with different perspectives and
often with different terminologies. The problem-solving process starts with the problem
specification and end with a correct program.
The steps to follow in the problem-solving process are:
Problem definition
Problem Analysis
Algorithm development
Coding
Testing & Debugging
Documentation & Maintenance
The stages of analysis, design, programming, implementation and maintenance form the life cycle
of the system.
Everything about OOPs (Object-oriented programming) in this slide we cover the all details about object-oriented programming using C++. we also discussed why C++ is called a subset of C.
Keywords, identifiers ,datatypes in C++Ankur Pandey
Everything about Keywords, Identifiers,
Datatypes in C++, in this module you gain knowledge about what is Keywords, Identifiers,
Datatypes in C++ (Object oriented programming).
C++ is an object-oriented programming language developed by Bjarne Stroustrup at AT&T Bell Lab in the year 1980. Initially it was named “C with classes” but later in 1983 the name changed to C++. It is an extension of C with..
Introduction
The term problem solving is used in many disciplines, sometimes with different perspectives and
often with different terminologies. The problem-solving process starts with the problem
specification and end with a correct program.
The steps to follow in the problem-solving process are:
Problem definition
Problem Analysis
Algorithm development
Coding
Testing & Debugging
Documentation & Maintenance
The stages of analysis, design, programming, implementation and maintenance form the life cycle
of the system.
Everything about OOPs (Object-oriented programming) in this slide we cover the all details about object-oriented programming using C++. we also discussed why C++ is called a subset of C.
Keywords, identifiers ,datatypes in C++Ankur Pandey
Everything about Keywords, Identifiers,
Datatypes in C++, in this module you gain knowledge about what is Keywords, Identifiers,
Datatypes in C++ (Object oriented programming).
#Code2Create series: C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on.Start your programming journey and join us to learn C++ basics!
by Google Developers Group and Women Tech-markers Kuwait chapter:
Instagram and Twitter: @GDGWTMKUWAIT
Esoft Metro Campus - Programming with C++
(Template - Virtusa Corporate)
Contents:
Overview of C++ Language
C++ Program Structure
C++ Basic Syntax
Primitive Built-in types in C++
Variable types
typedef Declarations
Enumerated Types
Variable Scope
Constants/Literals
Storage Classes
Operators
Control Constructs
Functions
Math Operations in C++
Arrays
Multi-dimensional Arrays
Strings
C++ Pointers
References
Date and Time
Structures
Basic Input / Output
Classes and Objects
Inheritance
Overloading
Polymorphism
Interfaces
Files and Streams
Exception Handling
Dynamic Memory
Namespaces
Templates
Preprocessor
Multithreading
Esoft Metro Campus - Certificate in c / c++ programmingRasan Samarasinghe
Esoft Metro Campus - Certificate in java basics
(Template - Virtusa Corporate)
Contents:
Structure of a program
Variables & Data types
Constants
Operators
Basic Input/output
Control Structures
Functions
Arrays
Character Sequences
Pointers and Dynamic Memory
Unions
Other Data Types
Input/output with files
Searching
Sorting
Introduction to data structures
Do you want to learn basic information about the c Language?
Yes!
That’s great.
This pdf is the right choice for you.
Here, I will provide you all the basic information about C language.
You can visit our blog to enjoy our original post.
C programming Training in Ambala ! Batra Computer Centrejatin batra
Batra Computer Centre is An ISO certified 9001:2008 training Centre in Ambala.
We Provide C Programming Training in Ambala. BATRA COMPUTER CENTRE provides best training in C, C++, S.E.O, Web Designing, Web Development and So many other courses are available.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
Launch Your Streaming Platforms in MinutesRoshan Dwivedi
The claim of launching a streaming platform in minutes might be a bit of an exaggeration, but there are services that can significantly streamline the process. Here's a breakdown:
Pros of Speedy Streaming Platform Launch Services:
No coding required: These services often use drag-and-drop interfaces or pre-built templates, eliminating the need for programming knowledge.
Faster setup: Compared to building from scratch, these platforms can get you up and running much quicker.
All-in-one solutions: Many services offer features like content management systems (CMS), video players, and monetization tools, reducing the need for multiple integrations.
Things to Consider:
Limited customization: These platforms may offer less flexibility in design and functionality compared to custom-built solutions.
Scalability: As your audience grows, you might need to upgrade to a more robust platform or encounter limitations with the "quick launch" option.
Features: Carefully evaluate which features are included and if they meet your specific needs (e.g., live streaming, subscription options).
Examples of Services for Launching Streaming Platforms:
Muvi [muvi com]
Uscreen [usencreen tv]
Alternatives to Consider:
Existing Streaming platforms: Platforms like YouTube or Twitch might be suitable for basic streaming needs, though monetization options might be limited.
Custom Development: While more time-consuming, custom development offers the most control and flexibility for your platform.
Overall, launching a streaming platform in minutes might not be entirely realistic, but these services can significantly speed up the process compared to building from scratch. Carefully consider your needs and budget when choosing the best option for you.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
OpenMetadata Community Meeting - 5th June 2024OpenMetadata
The OpenMetadata Community Meeting was held on June 5th, 2024. In this meeting, we discussed about the data quality capabilities that are integrated with the Incident Manager, providing a complete solution to handle your data observability needs. Watch the end-to-end demo of the data quality features.
* How to run your own data quality framework
* What is the performance impact of running data quality frameworks
* How to run the test cases in your own ETL pipelines
* How the Incident Manager is integrated
* Get notified with alerts when test cases fail
Watch the meeting recording here - https://www.youtube.com/watch?v=UbNOje0kf6E
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Atelier - Innover avec l’IA Générative et les graphes de connaissancesNeo4j
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Allez au-delà du battage médiatique autour de l’IA et découvrez des techniques pratiques pour utiliser l’IA de manière responsable à travers les données de votre organisation. Explorez comment utiliser les graphes de connaissances pour augmenter la précision, la transparence et la capacité d’explication dans les systèmes d’IA générative. Vous partirez avec une expérience pratique combinant les relations entre les données et les LLM pour apporter du contexte spécifique à votre domaine et améliorer votre raisonnement.
Amenez votre ordinateur portable et nous vous guiderons sur la mise en place de votre propre pile d’IA générative, en vous fournissant des exemples pratiques et codés pour démarrer en quelques minutes.
Graspan: A Big Data System for Big Code AnalysisAftab Hussain
We built a disk-based parallel graph system, Graspan, that uses a novel edge-pair centric computation model to compute dynamic transitive closures on very large program graphs.
We implement context-sensitive pointer/alias and dataflow analyses on Graspan. An evaluation of these analyses on large codebases such as Linux shows that their Graspan implementations scale to millions of lines of code and are much simpler than their original implementations.
These analyses were used to augment the existing checkers; these augmented checkers found 132 new NULL pointer bugs and 1308 unnecessary NULL tests in Linux 4.4.0-rc5, PostgreSQL 8.3.9, and Apache httpd 2.2.18.
- Accepted in ASPLOS ‘17, Xi’an, China.
- Featured in the tutorial, Systemized Program Analyses: A Big Data Perspective on Static Analysis Scalability, ASPLOS ‘17.
- Invited for presentation at SoCal PLS ‘16.
- Invited for poster presentation at PLDI SRC ‘16.
Artificia Intellicence and XPath Extension FunctionsOctavian Nadolu
The purpose of this presentation is to provide an overview of how you can use AI from XSLT, XQuery, Schematron, or XML Refactoring operations, the potential benefits of using AI, and some of the challenges we face.
Zoom is a comprehensive platform designed to connect individuals and teams efficiently. With its user-friendly interface and powerful features, Zoom has become a go-to solution for virtual communication and collaboration. It offers a range of tools, including virtual meetings, team chat, VoIP phone systems, online whiteboards, and AI companions, to streamline workflows and enhance productivity.
4. What is Algorithm
• step-by-step Procedure to solve a problem
• Using algorithm problem solving become easier
• Its better to write algorithm before writing code
How to Write Algorithm
• Problem broke down into pieces in meaningful steps
• Step should be Numbered
• Step should be Descriptive
• Write in Simple English
5. More About Algorithm
• Algorithm is write language that is similar to Simple English called Pseudo Code
• It is used to simplify the Program logic
Two Main Parts of Pseudo Code
• Logic Design
Specify different steps
• Coding
Algorithm convert into code
6. Write a Algorithm input Two Numbers, calculate sum
and display on screen.
Step 1: Start
Step 2: Input A
Step 3: Input B
Step 4: Sum=A+B
Step 5: Display Sum
Step 6: End
7. Example 2: Determine and Output Whether Number N is Even or Odd.
Step 1: Start
Step 2: Read number N
Step 3: Set remainder as N modulo 2
Step 4: If remainder is equal to 0 then number N is even, else number N is odd
Step 5: Print output.
Step 6: End
8. Determine Whether A Student Passed the Exam or Not:
Step 1: Start
Step 2: Input grades of 4 courses M1, M2, M3 and M4,
Step 3: Calculate the average grade with formula "Grade=(M1+M2+M3+M4)/4"
Step 4: If the average grade is less than 60, print "FAIL", else print "PASS".
Step 5: End
10. What is Flowchart
• A type of diagram that represents an
algorithm
• workflow or process.
• It shows the steps as boxes of various kinds
• and their order by connecting the boxes with
arrows.
• Solution of given problem.
16. Types of Programming Languages
procedural language
That follows, in order, a set of commands
Examples of computer procedural languages are BASIC,
C, FORTRAN and Pascal.
Non-procedural language
That does not require writing traditional programming
logicExamples of computer procedural languages are as C++ or Java
Object-oriented language (OOL)
programming language that implements objects and
their associated procedures within the programming
Examples of Object-oriented language are as php or
Java
17. High Level Language
• Language that is Near to Human Language and Far from Computer
• Computer Need a translator tom understand it
Low Level Language
• Language that is Near to Computer Language and Far
from Human
• Computer don’t Need a translator tom understand it
18. Translator
A program who translates from one language into another Language
Types Translator
Compiler
Interpreter
Assembler
19. Compiler
The Program that convert program High Level Language to
Low Level Language as a whole
It also Check Syntax Error
20. Interpreter
The Program that convert one Statement at a time
If there is a error stop working and till correct error
Execute first then move on next statement
It also make an object file
22. Structure of C++ Program
#include<iostream.h>
using namespace std
int main()
{
cout<<“Hello Learn 4 Earn”;
return 0;
}
Header Files
Preprocessor Directives
"std" namespace
Main Function
Body of program
23. Preprocessor Directives
Preprocessors are programs that process our
source code before compilation
Preprocessor commands begin with a hash symbol (#).
Compiler Directive
Types of Preprocessor Directives
#include
#define
Include header files
Define constant
24. Header Files
Collection of Library Functions
Include in start of program
Always enclose in < >
Header files always extension .h
Syntax
#include<header_file_name>
25. A namespace is a declarative region that provides a scope to the identifiers (the names of
types, functions, variables,
namespace
used to organize code into logical groups and to prevent name collisions that can occur
especially when your code base includes multiple libraries
Main Function
the entry point of any C++ program
It is the point at which execution of program is started
When a C++ program is executed, the execution control
goes directly to the main() function.
Without main() program will execute but not compile
26. Body of Program
In curly braces all the instruction written
Always start with opening brace {
Always End with closing brace }
Braces are known as Delimeters
27. A C++ identifier is a name used to identify a variable, function, class,
module, or any other user-defined item
Identifiers
Rules For Identifiers
First Character must be Alphabet or Underscore ( _ )
Must consist of only underscore ( _ ) , alphabet or digit
Reserved Word can not use as identifiers
28. Keywords
Keyword is a predefined or reserved word in C++
library with a fixed meaning and used to perform an internal
operation
C++ Language supports more than 64 keywords
Every Keyword exists in lower case latter
Example
const float short unsigned
continue for signed void
default goto sizeof volatile
do if static while
29. Data Types
Data type is a keyword used to identify type of data
These are the data types whose variable can hold maximum one value at a time
in C++ language it can be achieve by int, float, double, char.
Primitive data types
These data type are derived from fundamental data type. Variables of
derived data type allow us to store multiple values of same type in one
variable but never allows to store multiple values of different types.
Derived data types
User defined data types related variables allows us to store multiple
values either of same type or different type or both.
User defined data types
30.
31. Integer
Keyword used for integer data types is int
Integers typically requires 4 bytes of memory space
ranges from -2147483648 to 2147483647
Floating Point
Floating Point data type is used for storing single precision
floating point values or decimal values
Keyword used for floating point data type is float.
Float variables typically requires 4 byte of memory space.
Character
Character data type is used for storing characters
Keyword used for character data type is char
Characters typically requires 1 byte of memory space
ranges from -128 to 127 or 0 to 255
32. Double Floating Point
Double Floating Point data type is used for storing double
precision floating point values or decimal values
Keyword used for double floating point data type is double
Double variables typically requires 8 byte of memory space
Boolean
Boolean data type is used for storing boolean or logical values
A boolean variable can store either true or false
Keyword used for boolean data type is bool
void
Void means without any value
void datatype represents a valueless entity
Void data type is used for those function which does not
returns a value
33. Data Type Size (in bytes) Range
short int 2 -32,768 to 32,767
unsigned short int 2 0 to 65,535
unsigned int 4 0 to 4,294,967,295
int 4
-2,147,483,648 to
2,147,483,647
long int 4
-2,147,483,648 to
2,147,483,647
unsigned long int 4 0 to 4,294,967,295
long long int 8 -(2^63) to (2^63)-1
unsigned long long int 8
0 to
18,446,744,073,709,551,615
signed char 1 -128 to 127
unsigned char 1 0 to 255
float 4
double 8
long double 12
wchar_t 2 or 4 1 wide character
34. where operations on 2 numbers exceeds the maximum
value
Integer overflow
Integer underflow
where operations on 2 numbers decrees the minimum
value
35. Variables
A variable is a name given to a memory location
It is the basic unit of storage in a program
The value stored in a variable can be changed during
program execution
A variable is only a name given to a memory location
all the operations done on the variable effects that
memory location.
36. Variables declaration
Process of specifying variable name and Data type
Syntax
Data_Type Variable_Name;
Int number;
Variables Initialization
Process of assigning value to variable at time of declaration
Syntax
Data_Type Variable_Name = value ;
Int number = 10 ;
37. Rules for Variables declaration
1. A variable name can consist of Capital letters A-Z, lowercase letters a-z, digits 0-
9, and the underscore character.
2. The first character must be a letter or underscore
3. Blank spaces cannot be used in variable names
4. Special characters like #, $ are not allowed.
5. C++ keywords cannot be used as variable names
6. Variable names are case-sensitive.
7. A variable name can be consisting of 31 characters only if we declare a variable
more than one characters compiler will ignore after 31 characters.
8. Variable type can be bool, char, int, float, double, void
or wchar_t
38. Constant
like a variable, is a memory location where a value can be
storedconstants never change in value
You must initialize a constant when it is created
Way to Create Constant
Using const Keyword
const type variable = value;
const int PI= 3.1415;
Using #define Directive
#define identifier value
#define PI 3.1415
39. Expression
Expression in C++ is a combination of Operands and
Operators
Evaluate a Single Value
A = 10 , b = 5.0 , c = 4.4 , Result
Result= a+b(a*c) / (a-b)
Example
40. An operator is a symbol that tells the compiler to perform specific
mathematical or logical manipulations
Operators
Operands are expressions or values on which an operator operates or
works (often constants or variables but sub-expressions are also
permitted).
Operands
1. Arithmetic Operators
a. Unary Operator
b. Binary Operator
2. Relational Operators
3. Logical Operators
4. Assignment Operators
5. Compound Assignment Operators
Types of Operators
41. These are the operators used to perform arithmetic/mathematical operations on
operands.
Arithmetic operator
Operator Description Example
+ Adds two operands A + B will give 30
-
Subtracts second operand from
the first
A - B will give -10
* Multiplies both operands A * B will give 200
/
Divides numerator by de-
numerator
B / A will give 2
%
Modulus Operator and
remainder of after an integer
division
B % A will give 0
42. These are used for comparison of the values of two operands.
Relational operator
Also Known as Comparison Operator
Operator Description Example
==
Checks if the values of two operands are
equal or not
(A == B) is not true.
!=
Checks if the values of two operands are
equal or not
(A != B) is true.
>
Checks if the value of left operand is
greater than the value of right operand
(A > B) is not true.
<
Checks if the value of left operand is less
than the value of right operand
(A < B) is true.
>=
Checks if the value of left operand is
greater than or equal to the value of
operand
(A >= B) is not true.
<=
Checks if the value of left operand is less
than or equal to the value of right
operand,
(A <= B) is true.
43. Logical Operators are used to combine two or more conditions/constraints or to
complement the evaluation of the original condition in consideration. The result of the
operation of a logical operator is a boolean value either true or false
Logical Operator
Operator Description Example
&&
Called Logical AND operator. If
the operands are non-zero, then
condition becomes true.
(A && B) is false.
||
Called Logical OR Operator. If any
the two operands is non-zero, then
condition becomes true.
(A || B) is true.
!
Called Logical NOT Operator. Use to
reverses the logical state of its
operand. If a condition is true, then
Logical NOT operator will make
!(A && B) is true.
44. Increment operators are used to increase the value of the variable by one .
Increment operators
Prefix Increment
Postfix Increment
Decrement operators
Decrement operators are used to decrease the value of the variable by one.
Prefix Decrement
Postfix Decrement
45. Assignment Operators
Operator Description Example
=
Simple assignment operator, Assigns
values from right side operands to left
operand.
C = A + B will assign value of A + B into C
+=
Add AND assignment operator, It adds
right operand to the left operand and
assign the result to left operand.
C += A is equivalent to C = C + A
-=
Subtract AND assignment operator, It
subtracts right operand from the left
operand and assign the result to left
operand.
C -= A is equivalent to C = C - A
*=
Multiply AND assignment operator, It
multiplies right operand with the left
operand and assign the result to left
operand.
C *= A is equivalent to C = C * A
/=
Divide AND assignment operator, It
left operand with the right operand and
assign the result to left operand.
C /= A is equivalent to C = C / A
%=
Modulus AND assignment operator, It
takes modulus using two operands and
assign the result to left operand.
C %= A is equivalent to C = C % A
46. Operator Precedence
operator is a property that determines how operators of the higher and
lower Priority
Category Operator
Parentheses
( )
Division and Multiplication * , /
Plus and Minus + , -
Additive + -
47. operator is a property that determines how operators of the same precedence
are grouped in the absence of parentheses
Certain operators have higher precedence than others
Operator Associativity
This affects how an expression is evaluated.
Category Operator Associativity
Postfix () [] -> . ++ - - Left to right
Unary + - ! ~ ++ - - (type)* & sizeof Right to left
Multiplicative * / % Left to right
Additive + -
Left to right
Relational < <= > >= Left to right
Equality == !=
Left to right
48. Category Operator
Associativity
Logical AND
&&
Left to right
Logical OR
||
Left to right
Conditional
?:
Right to left
Assignment
= += -= *= /= %=>>= <<= &= ^=
|=
Right to left
Comma
, Left to right
Operator Associativity
49. Type Casting
A type cast is basically a conversion from one type to another.
Also known as ‘automatic type conversion’.
Implicit Type Casting
Done by the compiler on its own,
All the data types of the variables are upgraded to the data
type of the variable with largest data type.
bool -> char -> short int -> int -> unsigned int -> long -> unsigned -> long long -> float -> double -> long double
50. Explicit Type Casting
This process is also called type casting and it is user-defined. Here the
user can typecast the result to make it of a particular data type.
This is done by explicitly defining the required type in front of the expression in
parenthesis. This can be also considered as forceful casting.
Syntax:
(type) expression
double x = 1.2;
int sum = (int)x + 1;
51. The C++ comments are statements that are not executed by the
compiler.
Comments
The comments in C++ programming can be used to provide
explanation of the code, variable, method or class
C++ Single Line Comment
The single line comment starts with // (double slash). Let's see an
example of single line comment in C++
The C++ multi line comment is used to comment multiple
lines of code. It is surrounded by slash and asterisk (/∗ .....
∗/). Let's see an example of multi line comment in C++.
C++ Multi Line Comment