I want to stop the \t tab after 5 spaces, How do i do that?
Sarang07 0 Newbie Poster
Recommended Answers
Jump to PostYou could try something like below...I
That should produce an error because \' ' is not a valid escape sequence.
If you don't like the default spacing then don't use tabs. Do something like this:
printf("%-20s", "Hello World");
where the text string will be left-justified in a field 20 …
Jump to PostC doesn't specify tab stops, only tab characters. It's up to the program consuming those characters to interpret the character with a certain tab stop length, just like it's up to the same program to accurately print the 'Q' character. Translation: change the properties of whatever program is displaying those …
All 5 Replies
ithelp 757 Posting Virtuoso Banned
gerard4143 371 Nearly a Posting Maven
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Narue 5,707 Bad Cop Team Colleague
Sarang07 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.