Default values of int when not initialized in c. why do i get different outputs?

后端 未结 5 1868
余生分开走
余生分开走 2021-01-16 13:49

i was just trying to check the default value of int and char when not initialised in c. my problem is that i get two different outputs when i use clrscr() to clear the scree

5条回答
  •  再見小時候
    2021-01-16 14:52

    You shouldn't be expecting anything in particular. The values are uninitialized, i.e.: can be anything.

    Why the garbage value in the first case differs from the garbage value in the second case? Who knows? Different memory map, different execution paths - different garbage.

提交回复
热议问题