what is the meaning of this syntax
for(int x:v)
how to use this syntax in any other form
Syntax meaning explanation
Hello @vishal_sangal_123 this is for each loop in which you declare the variable of datatype as of the type of the data structure you want to iterate and then can use to traverse or print the elements.
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.