C++
C++ is across-platform language that can be used to create high-performance
applications.
C++ was developed by Bjarne Stroustrup, as an extension to the C language.
C++ gives programmers a high level of control over system resources and
memory.
C++ is a general-purpose programming language that was developed as an
enhancement of the C language to include object-oriented paradigm. It is an
imperative and a compiled language.
3.
OVERVIEW
C++ is oneof the world's most popular programming languages.
C++ can be found in today's operating systems, Graphical User Interfaces, and
embedded systems.
C++ is an object-oriented programming language which gives a clear structure
to programs and allows code to be reused, lowering development costs.
C++ is portable and can be used to develop applications that can be adapted to
multiple platforms.
As C++ is close to C, C# and Java, it makes it easy for programmers to switch to
C++ or vice versa.
4.
ADVANTAGES
Performance: It isa compiled language, which means that its code is compiled
into machine-readable code, making it one of the fastest programming
languages.
Object-Oriented Programming: C++ supports object-oriented programming,
which makes it easier to write and maintain large, complex applications.
Standard Template Library (STL): The STL provides a wide range of algorithms
and data structures for working with data, making it easier to write efficient and
effective code.
5.
ADVANTAGES
Machine Independent: C++is not tied to any hardware or processor. If the
compiler compiles the program in the system, it will be able to run no matter
what the hardware is.
Large Community: C++ has a large, active community of developers and users,
providing a wealth of resources and support for learning and using the
language.
6.
DISADVANTAGES
Steep Learning Curve:C++ can be challenging to learn, especially for beginners,
due to its complexity and the number of concepts that need to be understood.
Verbose Syntax: C++ has a verbose syntax, which can make code longer and
more difficult to read and maintain.
Error-Prone: C++ provides low-level access to system resources, which can lead
to subtle errors that are difficult to detect and fix.
7.
FLOWCHART
Flowchart is agraphical representation of an algorithm. Programmers
often use it as a program-planning tool to solve a problem. It makes
use of symbols which are connected among them to indicate the flow
of information and processing.
The process of drawing a flowchart for an algorithm is known as
“flowcharting”.
8.
RULES IN CREATINGA
FLOWCHART:
A flowchart is a graphical representation of an algorithm. It should
follow some rules while creating a flowchart.
Rule 1: Flowchart opening statement must be ‘start’ keyword.
Rule 2: Flowchart ending statement must be ‘end’ keyword.
Rule 3: All symbols in the flowchart must be connected with an arrow
line.
Rule 4: The decision symbol in the flowchart is associated with the
arrow line.
Basic Symbols usedin Flowchart Designs:
TERMINAL
Terminal: The oval symbol indicates Start, Stop and Halt in a program’s
logic flow. The oval shape, also known as the terminal symbol, is as an
elongated circle or an ellipse. A pause/halt is generally used in a program
logic under some error conditions. Terminal is the first and last symbols
in the flowchart.
11.
Basic Symbols usedin Flowchart Designs:
INPUT/OUTPUT
Input/Output: A parallelogram denotes any function of input/output
type. Program instructions that take input from input devices and display
output on output devices are indicated with parallelogram in a flowchart.
A parallelogram in flowchart represents both input and output processes
within a system.This means it marks the point in a process where a user
has to enter data into a system, such as an online shopper entering their
name, address, and payment details, into the system.
12.
Basic Symbols usedin Flowchart Designs:
PROCESSING
Processing: A rectangle is used to highlight each specific task or action
within a process. Also known as the process symbol, the rectangle is
fundamental to mapping out the sequence of actions or operations that
take place from the start to the end of a process. A rectangle represents
arithmetic instructions. All arithmetic processes such as adding,
subtracting, multiplication and division are indicated by action or process
symbol.
13.
Basic Symbols usedin Flowchart Designs:
DECISION
Decision: A diamond or a rhombus highlights a decision point in a
flowchart and hence is also known as the decision symbol. Decision
based operations such as yes/no question or true/false are indicated
by diamond in flowchart.
14.
Basic Symbols usedin Flowchart Designs:
FLOW LINES
Flow Lines: Flow lines indicate the exact sequence in which
instructions are executed. Arrows represent the direction of flow of
control and relationship among different symbols of flowchart. An
arrow usually connects two rectangles, parallelograms or diamond
symbols to highlight a sequence flow between the two. The sole
purpose of arrows is to provide visual direction to your flowchart.
15.
Basic Symbols usedin Flowchart Designs:
CONNECTORS
Connectors: Whenever flowchart becomes complex or it spreads over
more than one page, it is useful to use connectors to avoid any
confusions. It is represented by a circle. This shape connects two or
more separate paths within a flowchart without the need for long,
intersecting lines that can make the flowchart difficult to follow.
16.
Example: The userwants to display “Hello World”
TERMINAL
FLOW LINE
INPUT/OUTPUT
FLOW LINE
TERMINAL
ACTIVITY: Create aflowchart and write their respective algorithms.
Draw a flowchart to log in to facebook account
Print “Hello World” 15 times.
Find the sum of 10 numbers.
Add 30 and 50.