Page 1 of 1

Your views

Posted: Sat Aug 04, 2007 10:28 pm
by rich_m
I have been given a simple assignment, quoted below, and finished working it out.
Write a C program that would create employee data for 100 employees.
Each employee should have a name, ecode, age and department details.
Don't use a programmatic initialization. Instead, it should be
possible to provide these values as keyboard input either directly
or through indirection.

It should be possible to query on either name or ecode and get
complete details about the employee.
I would like to know how each of u would have solved the above, i.e. your approach.

PS: we are not allowed to ask our teacher anything regarding the question

Posted: Sat Aug 04, 2007 10:41 pm
by rich_m
Can I make my program find out it the input is from re direction or through keyboard?

Posted: Sun Aug 05, 2007 12:52 pm
by Candy
rich_m wrote:Can I make my program find out it the input is from re direction or through keyboard?
man isatty