Quick Contact

✉
fahimkhan20148@gmail.com
📱
+971 507 286 133
Back to Notes
August 23, 2026
cmemorystorage-classes

Auto Storage Class in C

Auto is the default modifier for visibility & lifetime is bound to its scope; its memory is acquired when it comes into scope and freed when it goes out of scope.

You don't need to specify auto unless you are shadowing a global variable and want to be specific about the shadowing.

int main(void) {
	int i = 10;
	auto int j = 10;
}

Both i and j are auto.