for(j = 1; j < 11; j++)
{
printf("%ds ",j);
sleep(1);
}
i have expected that this code will print "1s 2s 3s ... 10s" where there is 1 second interval between them but instead it prints all the numbers after 10 seconds. how should i fix it? i'm working on ubuntu.