Question: - What happens if I forget to initialize a variable? The compiler checks for this condition and if the variable is a char, it will

-What happens if I forget to initialize a variable?
The compiler checks for this condition and if the variable is a char, it will be set to A.
The compiler checks for this condition and if the variable is an int, it will be set to 0
The compiler checks for this condition and if the variable is a double, it will be set to 0.0
Nothing happens, the compiler does not care
The compiler checks for this condition and give you a "variable might not have been initialized" message
 -What happens if I forget to initialize a variable? The compiler

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!