0
Can anyone explain this to me?
What is the output of this loop and if it gives nothing why ?! If i is an integer and initialize to 1. for(i<5;i=0;i++) { printf("%d",i); }
3 Respuestas
+ 7
Variable "i" needs to be declared as type int. You need somthing like..
for(int i = 0; i<5;i++){
printf("%d",i);
}
+ 6
Assuming you had a main function and declared i around your loop. Your loop doesn't enter as i=0 is false so the exit condition was met. D_Stark fixed your loop to output 0 to 4.