How can i store data in C in a tabular format?

Posted by aks on Stack Overflow See other posts from Stack Overflow or by aks
Published on 2010-05-04T07:25:52Z Indexed on 2010/05/04 7:28 UTC
Read the original article Hit count: 248

Filed under:

Hi,

I want to store data in C in tabular format. I am having difficulty in relating the following. Can someone help?

For example: I want to store the follwong entries, then what should be the ideal way of storing in C?

     IP Address              Domain Name

1.) 10.1.1.2 www.yahoo.com 2.) 20.1.1.3 www.google.com

Should i use structures? Say for example?

struct table { unsigned char ip address; char domain_name[20]; };

If not, please clarify?

© Stack Overflow or respective owner

Related posts about c