Why are header files important when writing a program in C++?
Header files are vital in a C++ program as they contain the required function definitions for running inbuilt functions. Header files can be thought of as a dictionary that contains the definitions for all the words. Imagine a scenario where I write an essay with many new and unknown words and present it to a user without providing them any access to a dictionary. Most likely the chances are that he/she would not be able to understand what is written as the meaning of the words remain unknown. Now, if i provide a dictionary, the entire essay will be clear with the meanings in hand as the user can now refer to the dictionary to understand the meanings of the words that are unknown. The header files work in much the same way. When the program comes across a function. it refers to the header files to extract the steps that are required to run the respective function. Omitting the header file is similar to not presenting a dictionary to understand the meaning of the words. This would cause the compiler to give out errors.
What is the purpose of printf( ) ?
printf( ) is an inbuilt function in C that is mainly used for standard output of character, string, integer, float, double etc. to the monitor. In order for it to work, the function must be written in a specific format with format tags that specify the type of data to be output. For example, %d is used to specify that the output will be a signed decimal integer and %s is used to specify a string output.
What is the structure of the heart valves?
Heart valves are present at the junction between the atria and the ventricles. Between the right atrium and right ventricle is the tricuspid valve which contains three cusps. Between the left atrium and the left ventricle is the bicuspid or the mitral valve which contains two cusps. Both the valves are formed by the papillary muscles and attached to the walls of the heart via tendon like cords called chordae tendinae.