Auto keyword:
-Here auto refers as automatically.
-The auto keyword specifies that the type of the variable that is being declared will be automatically deducted from its initializer.
-auto becomes int type if even an integer reference is assigned to it
program:
#include < iostream>
using namespace std;
int main()
{
//Here i is automatically integer number
auto i=10;
//Here f is autommatically float number
auto f=4.1;
cout<<"Value of i is: "<< i<< endl;
cout<<"Value of j is: "<< f;
return 0;
}
Value of i is: 10
Value of j is: 4.1