M
M
Marat Ganiev2020-01-28 22:22:17
IT education
Marat Ganiev, 2020-01-28 22:22:17

Variables are not initialized in the OGE in computer science, is this normal?

I looked at the OGE in computer science, there is a task there, a program written in several programming languages ​​​​is given, and I did not see initialized variables in any of the example programs. This is what it looked like:
int a, b;

How can this be understood? Initialization 0 is not needed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-01-28
@MaratWantsToKnowALot

It all depends on the compiler and the standard.
In theory, there is garbage, but maybe 0
In general, it is better to write explicitly

A
alex1478, 2020-01-28
@alex1478

Need not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question