In general terms, the printf function is written as
printf(control string,arg1,arg2,arg3,.....,argn)
where control string refers to a string containing certain required formatting information,and arg1,arg2,arg3,....,argn are arguments that represent the the individual output data items.
Here is a simple program that makes use of the printf function
#include
main() /*print several floating point numbers*/
{
float i=2.0,j=3.0;
printf("%f %f",i,j);
}
2.000000 3.000000
No comments:
Post a Comment