Code:
int k;
for(k=1; k<=5; k++)
printf(“\nI am a student”);
printf(“\nGOOD BYE”);
The for loop will print “I am a student” five times because the loop runs from k = 1 to k = 5. After the loop finishes, printf("\nGOOD BYE"); will print “GOOD BYE” once, outside the loop.
Output:
I am a student
I am a student
I am a student
I am a student
I am a student
GOOD BYE