C assignment int

When you see such C code, what is the order of destination?

int i = 0, var1, var2;

I do not understand the syntax ...

+3
source share
5 answers

Only ia null value is assigned.

var1and var2uninitialized.

+11
source

"" . int, . = , - "". , - "".

, .

+7

(i = 0), - .

+4

i 0, var1 var2 , , ( ).

+4

They are all local variables, the only difference is that I am assigned the value 0, while the values ​​of var1 and var2 are unpredictable, they will have garbage values.

0
source

Source: https://habr.com/ru/post/1772315/


All Articles