Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Thursday, February 11, 2010

Output of a character constant

This output has the following format.

%wc

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

For eg:- let a = 'Q'





















Statement
Output
printf("%4c",a);
_ _ _ Q
printf("%8c",a);
_ _ _ _ _ _ _ Q
printf("%5c",a);
_ _ _ _ Q
printf("% - 7c",a);
Q _ _ _ _ _ _
printf("% - 4c",a);
Q_ _ _
printf("% 12c",a);
_ _ _ _ _ _ _ _ _ _ _ Q

Related Posts by Categories



0 comments:

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP