In this code during the printing of the string through iterator why we are using auto it and why not int it??
please elaborate this line.
Use of auto in iteration
@Nisha21
auto keyword ensures that the ‘it’ gets typecasted to whatever data type we try to print.
eg auto it : string --> it would be char
auto it : vector it would be int