When we use the auto datatype?

Generally when we use the auto datatype?

hello @udatta

auto is not datatype . it is keyword that automatically detects datype of data.
whenever u dont want to explicilty mention the datatype .
u can use auto keyword.

most of the times we use in loops, in for each loop and for iterators becuase their datatype are generally long so instead of explicitly mentioning the type we use auto.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.