in Programming in C recategorized by
1,863 views
2 votes
2 votes

If initialization is a part of declaration of a structure, then storage class can be

  1. automatic
  2. register
  3. static
  4. anything
in Programming in C recategorized by
by
1.9k views

1 comment

Static?

Because in static storage class initialization implicitly happens as a part of the declaration if the variable isn’t explicitly initialized.
1
1

1 Answer

2 votes
2 votes

coorect ans is : c

 

If initialization is a part of declaration of a structure, then the storage class can be static.

Storage class in C decides the part of storage to allocate memory for a variable; it also determines the scope of a variable. All variables defined in a C program get some physical location in memory where variable's value is stored. Memory and CPU registers are types of memory locations where a variable's value can be stored.

 

Static' variables are by default initialized with value 0.

 

 

by

1 comment

correct
1
1
Answer:

Related questions