Complete the code to declare an automatic variable inside the function.
void func() {
[1] int x = 10;
}The auto keyword declares an automatic variable inside a function, which is the default storage class.
Complete the code to declare a local variable with automatic storage class explicitly.
int main() {
[1] int count = 5;
return 0;
}Using auto explicitly declares a variable with automatic storage class inside a function.
Fix the error in the code by choosing the correct storage class for the variable inside the function.
void example() {
[1] int num = 100;
printf("%d", num);
}The variable inside the function should have automatic storage class, declared with auto.
Fill both blanks to declare two automatic variables inside the function.
void test() {
[1] int a = 1;
[2] int b = 2;
}Both variables are declared with auto storage class, which is the default for local variables.
Fill all three blanks to declare three automatic variables inside the function, where later variables depend on previous ones.
void func() {
[1] int x = 5;
[2] int y = x + 10;
[3] int z = y * 2;
}static thinking it needs to persist, but all should be automatic.static for all variables.All three variables are declared with auto storage class for automatic storage duration. Each function call creates new instances.