Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is the keyword auto for in C++?
Home
C Plus Plus
What is the keyword auto for in C++?
0
votes
asked
Jun 11, 2020
in
C Plus Plus
by
Robindeniel
What is the keyword auto for?
#c
-keyword-auto
#keyword-c
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 11, 2020
by
sharadyadav1986
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.
...