Use of 'auto' keyword in c++?

Example:


  int main() {
      int x = 10;
  }
  

Solution:


  int main() {
      auto x = 10;  // x is automatically of type int
  }
  

Beginner's Guide to C++