You are on page 1of 19

The name of the triple student

Amna haider abass

Stage – study

Computer engineering__second

++ Structured programming in C: Subject Name

‫ زيد نظال‬.‫ أ‬:Name of subject teacher


Programming languages can support many
patterns. For example but not limited to C
++ or Object Pascal, the program can be
procedurally written or object-oriented
entirely, or it can contain elements of the
.previous two patterns

Software design requirements and


programmers decide how to use style
.elements

In object-oriented programming, the


programmer can think of the program from
the perspective that it consists of a set of
interacting purposes between them, while in
functional programming, the program can be
seen as a series of successive satellite
evaluations. When programming with
computers or systems that have multiple
processors, the process-oriented mode
allows programmers to view applications as
well as a set of concurrent operations that
behave according to the common data
.structure

A computer model is an abstraction of a


computer system, such as the "von Neumann
model" used in traditional serial computer
hardware. As for branch computing, there
are many possible models that usually reflect
the different means by which processors can
be linked. The most common models
depend on shared memory, memory
distribution with passing messages, or a
.combination of both

The programming language can support


many models, so languages such as C ++ or
Pascal object can be used to write purely
procedural programs, or purely object or a
combination of the two patterns. The
decision to choose the most appropriate
model is for programmers and designers of
.the software system

In object-oriented programming, the


programmer views the program as a group of
objects that interact with each other, while
in functional programming a program can be
seen as a series of discrete finder operations.
When computer systems are programmed
with multiple processors, process-oriented
programming allows programmers to view
the program as a set of concurrent processes
that are implemented on a set of data
.structures that are logically shared

Just as there are different sets of


methodologies in software engineering,
there are different sets of programming
styles. Some languages are designed to
support one style (such as Smalltalk that
supports object-oriented programming only,
and Haskell that support functional
programming only), while others are
designed to support several patterns (such as
object-pascal, C ++, C-Sharp, Visual Basic,
.Python, Perl And others)

Programming patterns are also known as


features that prevent them. For example,
functional programming does not allow the
use of side effects, while structural
programming does not allow the use of the
goto statement. Perhaps for this reason, it
criticizes many of the new patterns that
allow many additional features, as it is useful
to prevent a specific feature in the ability to
prove the theorem of the program’s validity,
or simply it may provide a better
understanding of the program. To make
programming easier, the assembly languages
have been developed. Assembly language is
a low-level programming language intended
for programming computers,
microprocessors, microcontrollers and
.integrated circuits
This language adopts the principle of
replacing many of the binary processor
instructions with a specific instruction
literally with the primary goal of making the
program readable by programmers, although
the assembly language does not cancel the
operation of the machine language but
rather is a development of the machine
.language readability

The assembly language is distinguished by


its variation according to the programmed
processor and its jurisprudence, whereas
while we find instructions for the Intel 86x
processor, we find instructions for processors
such as Mips "for the creation for
educational purposes", and we find that
programs written in a language that supports
a 32-bit processor differ from the 64-bit
.processor in general
Assembly language is also of a low
standard, though it is considered to be the
.second generation of programming styles

Example of an assembly-dependent code =


An example of an assembly-dependent code
(from the Mips 3000 processor)

MOV AL, 61h

The label
The name "C sharp" is inspired by the
musical notation, where the symbol ♯
indicates that the score is about half more
musical. This designation is similar to the
name of the language C ++, where "++"
indicates that the variable must be increased
resembles a four- ‫ يشبه‬by 1. The symbol
letter "+" (in a 2x2 grid), which implies that
.+ this language is a 1 increase over + C
History of the language
The development of the dot net platform
started by writing a set of class libraries, and
it used a managed drainage system called
Simple Managed C or SMC for this. Later, in
January 1999, Anders Hilsberg formed a
team of developers aiming to build a new
language called Cool. The name abbreviates
for the phrase "C-like Object Oriented
Language". Microsoft decided to retain this
name but later relinquished it for legal
reasons related to registered trademark
rights. In parallel, the .NET project was
officially announced at the Professional
Developers Conference (PDC) in July 2000
and the language was renamed to C # and
the implementation time of the ESPN.com
language in addition to the class libraries was
.exported to this language

Java language designer James Gosling and


Bill Joy, one of the founders of Sun
Microsystems, which brought in Java,
considered C # to be only a "tradition" of the
Java language; "It [intended C #] is
somewhat dry, but after abandoning
reliability, productivity and safety," Gosling
said, commenting. Both Klaus Krafft and
Angela Langer wrote in their article on the
blog “Java and C # are almost identical
programming languages. This tedious
repetition lacks creativity”, “It is very difficult
to claim that Java or C # is a revolutionary
programming language that changed the way
we write programs.” "C # has borrowed a lot
from Java – and vice versa. C # supports the
canning and unpacking feature now and soon
we will find a similar feature in Java."
Anders Hilsberg said in July 2000 that C # is
not a "version of Java" but rather "closer to C
.++" in terms of design

In November 2005, C # 2.0 was announced,


and C # and Java started developing in
increasingly different directions. The first
and most important of these differences was
in the addition of global patterns (in English:
Generics) to both languages where the
realization of these patterns was very
different as C # deals with global patterns as
real rows and generates its own code at
execution time while Java treats these
patterns as an added feature To the
language, the developer was able to write a
generic code, and the translator was able to
verify the patterns only, while these patterns
were not converted to real patterns at the
time of implementation, and no special code
.# was generated similar to C

In addition, a set of important features


have been added to C # to enable the use of
functional programming in which it has been
mandated with the addition of Link in
version 3.0 and the programmatic
framework supporting lambda expressions,
appendices and unnamed styles. These
features enable the developer to use
functional programming techniques when it
is advisable to do so. Link add-ons and other
functional features help the developer write
fewer lines when performing routine tasks
such as querying from a database, parsing an
XML file, or searching within a data structure
so that it can focus on the logical program
goal and improve its readability and
.maintenance

C # had a mascot named Andy (named after


Anders Hilsberg) and was retired on January
.29, 2004

C ++ Banana
C ++ symbols *
A.B.C Uppercase English Letters – 1
a.b.c Small English Letters – 2
The original Arabic numerals-3 1.2.3
:Special codes such as -4
+ -< !" ][
_ )( > || ,*
/ >\< = >< = >>
<< # $ %= !&

Table 1-1
These codes are of all kinds, the raw
material from which the vocabulary of the C
++ language is formed
You studied another language before C ++,
so you notice that C ++ does not use symbols
An additional calculator keyboard is not
.found in some languages
C ++ words •

- :The words are of two types


Identifiers -1
They are the names we "programmers" call
.the computer what you want
:Identifiers are called
.A -variables
.B – Reservoirs (functions)
.C -Indicators

Rules for naming identifiers in the C- ++ •


:language
That the name be written from a -1
continuous series of letters or
numbers, provided that
"_" Begins with a letter or underline
That the name does not contain -2
special characters except for the
"_" underscore
That the name not be one of the -3
reserved words
Some correct examples of identifying
:names are
B6 .a
X_ray .b
Matrix .c
Ok_ .d
A .e
Soft_fine .f
Door12 .g
new .h_
Here are the invalid names for the reasons
:stated against each of them
because it looked with a number ‫ ف‬Up-7
.and not a letter
).( b6 to use the special symbol.1
)!( salim Ù to use the special symbol !
Ђ2 then non-English letters may not be
.used
)#( No § to use the special symbol # 1
It is worth noting that C ++ distinguishes
,between upper and lower case alphabet
For example, the names: System, system,
SYSTEM treat a cup different from
Each other due to the translator's
treatment of lowercase and upper case
letters. – Reserved words
They are standard words with pre-written
syntax not translated C ++, and are usually
.written in lowercase letters
And with its own, it performs it in the C ++
program, and these words are reserved
accordingly
:The alphabet is
Near Static asm Double long Sizeof
Do int While new auto else
For This Void Delete Goto if
Const Entry char Class Public Case
Continue Extern struct inline float Private
Virtual Volatile Frinde enum near Static
Cdecl Default inline Overload Unsigned
Typedef
Signed Pascal Operator Switch Template
Union
Register Protected far Catch char Const
Break Return
Table 2-1
It should be noted that these reserved
words may not be redefined or used
.Other than what was allocated to him
As you can see from the reserved word list,
C ++ is a small language as it is
Of the few reserved words, approximately
52 are only reserved. Constants Numeric
representation
Numerical constants can be represented in
- :the C ++ language in three forms
Correct integer constant .a
It is a number consisting of
numbers from 0 to 9
.Does not contain a decimal point -
"-" It can contain a "+" or -
Correct examples of the correct integer
- :constant
0
th15

1000
321
61-
The following numbers are not correct for
:the reasons stated against each of them
.Because it contains a decimal point :31.3
.Because it contains a sorter :000,1
.J72: Because it contains an alphabet
Because there is a space between :2 4
.many
Because there is a :1999 1992 1992
vacuum, and also because the number is
.large
Correct numbers can also be categorized in
.C ++, according to their length and capacity
- :Storage in her memory, for example
Valid constants 19897, 40000 are called int
.long
.Constants 16, -80, 45 are called int short
The constants 20000, 967 are called valid
.constants without the int unsigned flag
The difference between long and short
constants is in the number of volumes
required for each
A type in memory, as long takes up more
space, and short provides the number of
storage units
Used, and for valid constants without an int
unsigned signal, their use provides
One volume is used for the signal when the
word unsigned is mentioned, before the int,
by shifting the value to a positive value
without a signal, and for each type of the
previous types
.Its suitable applications
Floating-point Constants
is a number consisting of numbers 0 and 9 -
Must contain a decimal point -
"-" It can contain a "+" or -
"" ,It may not contain a sorter -
Examples of real number constants that use
- :the decimal point correctly
421.5
10.6
0.0
0
01
68.0-
The following examples are not correct for
- :the reasons stated against each of them
Because it does not contain a decimal :1000
.point
.Because it contains a sorter :21,000,4
Because it contains a space :2 4.83

You might also like