Akshay Gupta
Akshay Gupta

Reputation: 361

Diference between Storage allocation and memory allocation?

I want to know that if there is any difference in storage allocation and memory allocation in c and what exactly is storage allocation??

Upvotes: 0

Views: 177

Answers (1)

Spock77
Spock77

Reputation: 3325

In C the word storage is usually used in the context of storage class of a variable: auto, static, extern, register, which specifies the way memory will be allocated the variable. Memory allocation can be static, automatic, and dynamic.

In general sense 'storage' means just memory. So in your context I think they are synonyms but its better to use 'memory allocation' in order not to confuse with storage class.

Upvotes: 1

Related Questions