0 votes
in C Plus Plus by

What is the keyword auto for?

1 Answer

0 votes
by
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.

Related questions

+2 votes
0 votes
asked Jun 15, 2020 in C Plus Plus by Robindeniel
0 votes
asked Jun 15, 2020 in C Plus Plus by Robindeniel
...