Eelo Programmers

Eelo Programmers Eelo University Programmers community

17/01/2023

Mabruuk Caruus Mohamed Artan Adiga iyo Dumaashiday Allaha Idin Barakeeyo insha'allah Saaxiib.

Variables and typesThe usefulness of the "Hello World" programs shown in the previous chapter is rather questionable. We...
14/12/2016

Variables and types
The usefulness of the "Hello World" programs shown in the previous chapter is rather questionable. We had to write several lines of code, compile them, and then execute the resulting program, just to obtain the result of a simple sentence written on the screen. It certainly would have been much faster to type the output sentence ourselves.

However, programming is not limited only to printing simple texts on the screen. In order to go a little further on and to become able to write programs that perform useful tasks that really save us work, we need to introduce the concept of variables.

Let's imagine that I ask you to remember the number 5, and then I ask you to also memorize the number 2 at the same time. You have just stored two different values in your memory (5 and 2). Now, if I ask you to add 1 to the first number I said, you should be retaining the numbers 6 (that is 5+1) and 2 in your memory. Then we could, for example, subtract these values and obtain 4 as result.

The whole process described above is a simile of what a computer can do with two variables. The same process can be expressed in C++ with the following set of statements:

1
2
3
4
a = 5;
b = 2;
a = a + 1;
result = a - b;

Obviously, this is a very simple example, since we have only used two small integer values, but consider that your computer can store millions of numbers like these at the same time and conduct sophisticated mathematical operations with them.

We can now define variable as a portion of memory to store a value.

Each variable needs a name that identifies it and distinguishes it from the others. For example, in the previous code the variable names were a, b, and result, but we could have called the variables any names we could have come up with, as long as they were valid C++ identifiers.

Identifiers
A valid identifier is a sequence of one or more letters, digits, or underscore characters (_). Spaces, punctuation marks, and symbols cannot be part of an ident

PHP Programming.....PHP is a server-side scripting language designedprimarily for web development but also used as agene...
07/12/2016

PHP Programming.....
PHP is a server-side scripting language designed
primarily for web development but also used as a
general-purpose programming language . Originally
created by Rasmus Lerdorf in 1994, the PHP
reference implementation is now produced by The
PHP Development Team. PHP originally stood for
Personal Home Page, but it now stands for the
recursive acronym PHP: Hypertext Preprocessor .

Android is a mobile operating system developedby Google , based on the Linux kernel and designedprimarily for touchscree...
07/12/2016

Android is a mobile operating system developed
by Google , based on the Linux kernel and designed
primarily for touchscreen mobile devices such as
smartphones and tablets. Android's user interface
is mainly based on direct manipulation , using
touch gestures that loosely correspond to real-
world actions, such as swiping, tapping and
pinching, to manipulate on-screen objects, along
with a virtual keyboard for text input. In addition to
touchscreen devices, Google has further
developed Android TV for televisions, Android Auto
for cars, and Android Wear for wrist watches, each
with a specialized user interface. Variants of
Android are also used on notebooks , game
consoles, digital cameras, and other electronics.

Are you Programer ?What is an Error?How solve an Error ?When the error is ?
11/05/2014

Are you Programer ?

What is an Error?
How solve an Error ?
When the error is ?

What are some of the best programming languages to learn?
05/05/2014

What are some of the best programming languages to learn?

Do You Like One Of Them !!!Do Known One Of Them !!!!!We can help .........
04/05/2014

Do You Like One Of Them !!!
Do Known One Of Them !!!!!
We can help .........

which language do u want to be a professional
04/05/2014

which language do u want to be a professional

Do Like One Of Them =DDo Known One Of Them
04/05/2014

Do Like One Of Them =D
Do Known One Of Them

Always do like dis on your Examination but not your real life
04/05/2014

Always do like dis on your Examination but not your real life

Address

Istanbul

Website

Alerts

Be the first to know and let us send you an email when Eelo Programmers posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Shortcuts

Share

Category