The value of an automatic variable that is declared but not initialized will be 1. 0 2. -1 3. unpredictable 4. 3

Questions by Rujul   answers by Rujul

Showing Answers 1 - 6 of 6 Answers

Bharti

  • Mar 15th, 2007
 

The automatic variable takes garbage value


so its answer is Unpredictable value.

  Was this answer useful?  Yes

gaurav_gangwar9

  • Mar 17th, 2007
 

The value will be a garbage as auto variables and register variables are not initialised

so the ans is 3

  Was this answer useful?  Yes

Sambasiva

  • Dec 18th, 2015
 

When a variable is declared under automatic, the variable by default contains garbage value, if the variable either initialized or not initialized.

  Was this answer useful?  Yes

Anil kumar

  • Jan 22nd, 2016
 

Since all local variables are stored in stack the uninitialized variables will have junk but if the variables are qualified with some qualifier like static the default value is 0 for un-initialized variables because it is stored in uninitialized data segment.

  Was this answer useful?  Yes

indra singh

  • Sep 14th, 2017
 

Unpredictable

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions