Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Thursday, February 11, 2010

Output of string

The format of this output is %w.ps where 'w' shows the minimum field width and 'p' shows that only the first p character will be printed.

If w > 0 then the printing is right justify.
If w < 0 then the printing is left justify.

For eg:- name = "SEETA AUR GEETA"





















Statement
Output
printf("%15s",name);
SEETA_AUR_GEETA
printf("%10.6s",name);
_ _ _ _SEETA_
printf("%9.3s",name);
_ _ _ _ _ _SEE
printf("% - 10.7s",name);
SEETA_A_ _ _
printf("% - 12.9s",name);
SEETA_AUR_ _ _


Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP