0
Can we mimic 'for' with a function in c language
creating a function that can do the duty of a for loop
1 Réponse
0
C++ was created based on C language. Basically, if you write something in C, it should work in C++ (but not the opposite way e.g. 'cin' and 'cout' wouldn't work in C - instead you would use 'printf' and 'scanf').
'For' loop can be also used in C language, because it appeared at first in C. Just like 'while', 'do while' and a lot of other functions. Just find some basic course for C language somewhere and you will see. ;)