answersLogoWhite

0

I would use vi (or vim) for the actual typing in of the program and man to check up on the arguments to the functions I rarely use. (And [g]cc to compile the program.)

As to the actual program itself it would depend upon the target audience, that is if I was doing it as a program for me or someone else to use complete with mug-traps.

Basically I would use a while() loop to fgets() the birthdate; the current date I would pick up using time() followed by using localtime() to get the current yyyy/mm/dd. A simple calculation would ensue, taking into account any leap year corrections as necessary.

Obviously necessary sanity checking on inputs made (mug-trapping) would be done along with appropriate messages; as would inclusion of the relevant header files.

That should be enough hints to allow you to get it done.

Particularly, think about the use of fgets() as opposed to gets().

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is difference between stdioh and stdioh?

The latter is better.


Is it stdioh in c stores source code of program?

No. That's a header file used for input and output.


What is the use of stdioh in C programs?

stdio.h is a header file that is a part of the standard C library. It contains a number of routines used for standard input (usually from the keyboard) and output (usually to the console/terminal).


What is the use of stdioh in c?

It can be included into your source.


What is the use of using stdioh?

It can be included into your source.


What is the use of stdioh in c language?

It can be included into your source.


What is the difference between stdioh and conioh?

Their name, content and function.


Why is stdioh file used in c program?

The stdio.h file is used in c programs in order to import declarations of important functions and constants that are useful in doing input/output, using the library facilities of the compiler.


Why wev use of stdioh in c?

stdio.h files are used in c ,because "stdio" stands for standard Input and Output files .these headers is connect i/o device to the compiler


How do you rectify the error unable to open stdioh in turbo c?

Options/Compiler/Directories/Include - set the path of the include files.


Which library file contain the definition of stdioh and conioh header file function definition in C language?

Platform dependent, possibly LIBC.LIB or something like that.


Can i use both stdioh and iostream in single program?

Yes, you can use both <stdio.h> and <iostream> in a single C++ program. However, it's generally advisable to stick to one style of I/O to maintain consistency and avoid potential confusion. If you choose to mix them, remember that <stdio.h> functions use C-style I/O, while <iostream> provides C++-style I/O. Just be sure to manage the different buffering mechanisms appropriately.