[pic]
C is made up entirely of building blocks which have a particular ‘shape’ or form .A program is made up of functions, functions are made up of statements and declarations surrounded by curly braces { } .One and only one of these functions in the program must have the name main(). This function is always the starting point of a C program . The parentheses ‘()’ which follow the name of the function must be included even though they apparently serve no purpose at this stage.
’m
The Headers
#include header.h
At the top of a program file. For instance:
#include "myheader.h"
Includes a personal header file which is in the current directory Or
#include
includes a file which lies in a standard directory like ‘/usr/include’.
The #include directive is actually a command to the C preprocessor .
Now i will tell you about printf function .
The printf() function
• What is full form of printf function? - Print format function
• What is print format (printf) ? - It refers to a control parameter used by a class of functions typically associated with some types of programming languages. The format string specifies a method for rendering an arbitrary number of varied data type parameter(s) into a string. In simple words we can say It provides an superbly versatile way of printing text.
• How to print a normal string ? - printf ("..some string...");
• How to print a Integer ? - Here we cant use the same command we used in printing the text, we have to use control sequence - %d . The variable someinteger is printed instead of ‘%d’ . Below you see the command .
printf ("Integer = %d",someinteger);
Here is a small program with its output showing the example of printf function .
|| Download Turbo C ||
|| How to install Turbo C ||
/***********************************************************/
/* any