Categories

Jun 11 in C++

Q:

What is the keyword auto for?

1 Answer

Jun 11
By default, every local variable of the function is automatic i.e. auto. In the below function both the variables ‘i’ and ‘j’ are automatic variables.

void f()

 {

 int i;

 auto int j;

 }

NOTE: A global variable is not an automatic variable.
Click here to read more about C++
Click here to read more about Insurance

Related questions

Madanswer
Jun 15 in C++
Jun 11 in C++
Jun 9 in C++
...