C programming

February 21, 2005 at 21:42:29
Specs: Redhat 9, amd

Hi there,
Can anybody guide me in how to print (in C ) the output in the table form. for example if there are 18 object to be printed, I want 3 columns with 6 object in each of em.
Thanx in advance

See More: C programming

Report •

February 21, 2005 at 23:53:48

I dont know if C supports the <iomanip> header file bu it probably has something similar. In C++ I'd use the setw() function from <iomanip>. That way you can create a table format. You wont see any borderlines though because all you really do is spacing the output according to what you want it to look like.

There might be another way where you actually create tables...butt im still a beginner and so far thats the only way I know how to do it. setw() and for loops should do it for you.


War sucks, but the sound is good and WE are the DJ's

Report •

February 22, 2005 at 07:37:30

C has printf. Read the info pages for it. Printing formatted tabular data is not difficult.

Report •

February 22, 2005 at 23:52:09

thanx guys for all ur suggestions

Report •

Related Solutions

March 2, 2005 at 00:42:50

Hi panther9_99,
Just a philosophical point, no insult intended.

When you post your query, make sure your Subject line summarizes your query, that helps others as to look into a problem or not.

For ex. you could have summarized as

"C - Printing output in tabular format", i mean something like that.


Report •

Ask Question