Sunteți pe pagina 1din 7

Introduction
At first, it is impossible to see a
programmer in various fields of
programming who have never heard of C
Plus Plus. This mighty language, which
competes with other programming
languages for the top most popular
languages.
This language contains a set of
features such as its support for the
concept of object-oriented programming
(oop) and pointers, functions, and
today we will talk about an important
feature which is functions in C Plus
Plus.
At the beginning of my studies in C ++
I heard about something called
functions, I was amazed, is it a
concept similar to the concept of
mathematical functions, does it have
the same operations and the same rules
and conditions but it is
programmatically, but when I advanced
in this language and reached the stage
of functions I started with a thorough
study of this part of Language and
found that it is similar to the
functions of mathematics by name and
idea only
we will talk about some points like

-Concept of functions

-The importance of functions in programming


-Types of functions
- Personal opinion as a programmer
Concept of functions

Function means Method or method in the


English language. Method is also
called in Arabic.
What is the idea of functions?
The idea of the functions is that if
you want to implement the same code
multiple times in the program.
You write this code only once and call
for it only whenever you want to
implement it.
What does a keyword mean?
The programming function is a ready
code that is executed only when you
call it.
When you write the function name, this
means that you ask the program to
implement this function.
The importance of functions in
programming

Functions are a very important


benefit, because in actual programs,
for example, you may use the same code
20 times. Imagine, for example, that
if you press a button in your program,
the program will implement the same
code that consists of 10 lines and
your program contains 20 buttons,
instead of writing the same 10 Lines
for each of the 20 buttons, write them
once inside a function and call this
function only once for each button,
thus you have made your program faster
and its size is much smaller and this
is very very important in programming.
Types of functions

The programmer either has to write the


method himself then called (user-
defined method), or he uses using
functions in the same language (build
in) and all he has to do is call him
when he needs it to use it in his
program, and we will know below how we
can create this The user-defined
method is then called in the program.
the functions in any programming
language have four types
1- A function that does not return a
value and does not receive any
"parameter" value
2 - The function that receives the
"parameter" value but does not return
a value
3- Functions that we do not pass
parameters with but return a value
4- Functions that receive a parameter
and return a value.
Personal opinion as a programmer

S-ar putea să vă placă și