Log In Register

Units


Automatic Variables - Questions and Answers

 

Practice these Automatic Variables under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Automatic Variables for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Automatic Variables of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Automatic Variables.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Automatic Variables under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Automatic Variables topic of C Programming:

 

1.

Automatic variables

Answer: Option B

Explanation:

2.

Automatic variables are stored in

Answer: Option D

Explanation:

3.

Automatic variables are allocated memory in

Answer: Option A

Explanation:

4.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void foo(auto int i);
  3.     int main()
  4.     {
  5.         foo(10);
  6.     }
  7.     void foo(auto int i)
  8.     {
  9.         printf("%d\n", i );
  10.     }

Answer: Option C

Explanation:

5.

Which of the following storage class supports char data type?

Answer: Option D

Explanation:

6.

Automatic variables are allocated space in the form of a:

Answer: Option D

Explanation:

7.

Automatic variables are initialised to

Answer: Option C

Explanation:

8.

The variable declaration with no storage class specified is by default:

Answer: Option B

Explanation:

9.

Default storage class if not any is specified for a local variable, is auto

Answer: Option D

Explanation:

10.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int x;
  5.     }

here x is 

Answer: Option A

Explanation:

11.

What linkage does automatic variables have?

Answer: Option A

Explanation:

12.

Which of the following is a storage specifier?

Answer: Option B

Explanation:

13.

The scope of an automatic variable is:

Answer: Option A

Explanation:

14.

Automatic variables are variables that are

Answer: Option D

Explanation:

15.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         auto i = 10;
  5.         const auto int *p = &i;
  6.         printf("%d\n", i);
  7.     }

Answer: Option D

Explanation: