#include
#include
char line [80]
int main (){
strcpy(line."ball");
printf("%s\n",line);
printf("%72 s\n",line);
printf("% *s\n",36);
}
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 13, 2012, 12:58 PM
If the value to be printed is shorter than this number, the result is padded with blank spaces.
So, on a normal console window which is 80 characters wide, the following line will cause the string, ball, to be printed at the end of the line, preceded by 76 spaces:
printf("%80s\n","ball");
sami samPosted Aug 13, 2012, 10:38 AM
VulpesPosted Aug 13, 2012, 5:59 AM