Knowee
Questions
Features
Study Tools

BasicsWhat is storage class for variable A in below code?void main() { int A; A = 10; printf("%d", A);}Optionsautoexternregisterstatic

Question

BasicsWhat is storage class for variable A in below code?void main() { int A; A = 10; printf("%d", A);}Optionsautoexternregisterstatic

🧐 Not the exact question you are looking for?Go ask a question

Solution

The storage class for variable A in the given code is "auto".

Here's why:

In C programming, if no storage class is specified, the default storage class for local variables is "auto". In the given code, variable A is a local variable (because it's declared inside a function) and no storage class is specified. Therefore, its storage class is "auto".

Similar Questions

sicsWhat is storage class for variable A in below code?void main() { int A; A = 10; printf("%d", A);}

orrect answerDefault storage class of a variable is ________Optionsautoexternstaticregister

Which of the following is not a storage class specifier in C?a.Registerb.Automaticc.volatiled.External

Which of the following storage classes is utilized to inform the compiler that a variable defined as "extern" has been declared with external linkage elsewhere in the program?a.Registerb.Automaticc.staticd.External

What is the purpose of the register storage class in C?

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.