Kindly tell me the purpose of auto
Why auto is used
hi @rjhk6767_a9801e8bdca93439
The auto
keyword directs the compiler to use the initialization expression of a declared variable, or lambda expression parameter, to deduce its type.
Actually this type of answer is not beneficial for me kindly tell me why auto keyword is used here in easy to understand words.
bro, auto is just similar to data types like int, float, string etc… if u write auto it can contain any int, float, string etc, without defining it actually…
its also used for traversing over loops…
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.