consider the below programs. I would like to know why this codes behave in different way.Thankyou in advance.
this doesnot print any
#include <stdio.h>
int main() {
    int i = 0;
    while(i < 10) {
        if(i < 7)
            printf("value is%d", i++); 
    }
}
while this does
#include <stdio.h>
int main() {
    int i = 0;
    while(i < 10) {
        if(i < 7)
            printf("value is%d\n", i++);
    }
}
 
     
     
     
    