in Programming in C edited by
8,412 views
1 vote
1 vote

Which of the following does not represent a valid storage class in ’c’?

  1. automatic
  2. static
  3. union      
  4. extern
in Programming in C edited by
8.4k views

3 Answers

1 vote
1 vote
Best answer

There are 4 storage classes in C :

1)  Static

2) Extern

3) Auto

4) Register

"Union" is a data type and not a storage class..Storage class gives the visibility and locality information of variables used in a program..For example , every function has its own static area and hence the visibility of a static variable is within the particular function in which it is defined..

Hence C) is the correct answer 

selected by
1 vote
1 vote
Union is kind of container datatype.
0 votes
0 votes

Ans: C

A storage class defines the scope (visibility) and life-time of variables and/or functions within a C Program. They precede the type that they modify. We have four different storage classes in a C program −

  • auto
  • register
  • static
  • extern

Related questions