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().
No. That's a header file used for input and output.
Their name, content and function.
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
Platform dependent, possibly LIBC.LIB or something like that.
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.
The latter is better.
No. That's a header file used for input and output.
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).
It can be included into your source.
It can be included into your source.
It can be included into your source.
Their name, content and function.
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.
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
Options/Compiler/Directories/Include - set the path of the include files.
Platform dependent, possibly LIBC.LIB or something like that.
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.