+ 2

Why in an array if we have not initialized it, displays garbage values on printing?

20th Sep 2016, 11:47 AM
SUBHANKAR NATH
SUBHANKAR NATH - avatar
2 Réponses
+ 1
Lets have an example, consider your wardrobe consisting of some stuff. Now if you just declare that you want to store your stuff in the drawer of the cupboard without actually storing your desired data, when you access that drawer, you will find your old stuff. Similarly in PC the data is stored on semiconductors, each memory location is tested by the manufacturer with some datatype, when we declare a variable, and not assign any value, the garbage value we get after accessing that data is this data
8th Oct 2016, 2:01 AM
Danish Khan
Danish Khan - avatar
0
old data in the memory, from other programs,
24th Sep 2016, 5:34 AM
Amr Alaa Mohamed
Amr Alaa Mohamed - avatar