Actual data(result to be displayed): C Through
printf(":%-15.5s:",s)
Result is :C Thr :
Can anyone explain this?I'm confused.
Answers
Answered by
1
1.%s is used for to print string or character array in c.
2.if you take input:C THROUGH
3.then printf("%-15.5s:",s); print 5 characters out of total characters.
like print("%.5s",s);
abone -15.5 indicate .5 means number of characters and -15 indicate i will print hyphens(-----)
Similar questions
English,
6 months ago
Computer Science,
6 months ago
Science,
6 months ago
Computer Science,
1 year ago
Math,
1 year ago