What is keyword auto for in C? - ProProfs Discuss
Advertisement

What is keyword auto for in C?

What is keyword auto for in C?

Change Image    Delete

Asked by G. Horace, Last updated: Nov 09, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

A. Daniels

A. Daniels

A. Daniels
A. Daniels, Professor, San Diego

Answered Aug 06, 2018

C programming language uses storage classes to “describe the features of a variable/function”. These features basically include the scope, visibility and life-time which help us to trace the existence of a particular variable during the runtime of a program.” There are 4 such storage classes: auto, extern, static, and register.

C programming language uses storage classes to “describe the features of a
The auto feature is the “default storage class for all the variables declared inside a function or a block. Hence, the keyword auto is rarely used while writing programs in C language. Auto variables can be only accessed within the block/function they have been declared and not outside them (which defines their scope).”

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.