Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
jrockpunk1
jay
Send A Message
Rating
6.00
out of 10
( 2 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
C
Posted 3.27 Years Ago
561 Views
Received 2 Ratings
More Codes By This Author
guessing game
Guessing game
Greatest Common Factor
Very basic calculator
replace tabs ('\t') with...

replace tabs ('\t') with '|'s


Description
this takes a string from the user and prints it out replacing all the tabs they enter with lines. To understand you must understand how tabs work (tabsets etc).
Technical
used GCC with Cygwin on windows, and used nano as an editor (for the first time).
OS: windows vista 32 bit.
compatibility: all
Source Code
Comments
Please login to post comments.
 
jrockpunk1     Posted 3.15 Years Ago
 
 
umm no that wouldn't work. it needs to print until the next tabset.
 
-daniel-     Posted 3.15 Years Ago
 
 
the more compact version:

[code]
int main() {
int c;

while((c = getc(stdin)) != EOF) {
if(c == '\t')
c = '|';

putc(c, stdout);
}

return 0;
}
[/code]

:P
 
jrockpunk1     Posted 3.22 Years Ago
 
 
no comments?
Page 1 of 1
More "C" Source Codes By This Author
Recently Posted "C" Source Codes
Recently Rated "C" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
If you made money from keeping your profile up to date, say $30 and up, per month. What extra time would you spend on your profile?

No extra time
A few hours at weekends
A whole day each week
Every minute i can get free


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
3.49 Years Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2012, Scott Thompson, All Rights Reserved