Can we mimic 'for' with a function in c language | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can we mimic 'for' with a function in c language

creating a function that can do the duty of a for loop

19th Mar 2017, 1:05 PM
kousik
kousik - avatar
1 Answer
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. ;)
20th Mar 2017, 1:43 AM
Jan Kliszcz
Jan Kliszcz - avatar