We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Is in fact a normal for loop, it's just that there are no initial variable and no incrementation, because de incrementation is the array itself, and the condition to stop is when pt[++i] == 0 (the comparison can be ommited in C)... It's allowed you to define a for loop even like this for(;;), which is equal to while(1)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Security Key Spaces
You are viewing a single comment's thread. Return to all comments →
Is in fact a normal for loop, it's just that there are no initial variable and no incrementation, because de incrementation is the array itself, and the condition to stop is when pt[++i] == 0 (the comparison can be ommited in C)... It's allowed you to define a for loop even like this for(;;), which is equal to while(1)