Linker LD
// Link. c
# Include
# Include
Int main ()
{
Printf ("% F \ n", square (0.3 ));
System ("pause ");
Return 0;
}
// Square. c
Double square (Double X)
{
Return x * X;
}
Directly use LD to link the target file, and the output is as follows:
Original addressOne, Printf output formatThe general form of a format string in C is:%[flag [output minimum width] [. precision] [length] type, where the entry in square brackets [] is optional. The meanings of the items are described as follows:1.
Turn from: http://blog.csdn.net/willy3000/article/details/5786888
The parameter type of the character; output formd,i int type; Displays a signed decimal number (I and D are different when used in the scanf function).o int type; unsigned octal
/* Use the conversion specifier */# Include # Include # Define PI 3.141593 // The first method to create a symbolic constant# Define pages 93179962# Define blurb "authentic imtation! "# Define words 65618# Define pages2 336Int main (void){Printf ("\
The printf function is called the format output function, and the last letter F of its keyword is the meaning of format. The function is to display the specified data to the display screen according to the user-specified format. We have used this
C language printf output format control, printf output format
C language printf output format Control
Printf is familiar to everyone, but it is rare to estimate its usage. Go to another article and organize it in another day.
1. Conversion
# Include
/*************************************** *********************************///// Author: flyingleaf//// Function: simple test of the printf type, mainly to help mm view the abnormal printf Parameters//// Date: 2004-12-27//// Test tool:
%-0 M.N L or H format charactersThe following describes the items that comprise the format description:①%: Represents the starting symbol for the format description, which is indispensable.②-: Yes-Indicates left-aligned output, such as omitting to
This article introduces the three most commonly used input and output functions scanf (), printf (), GetChar () and Putchar () in C language.One, scanf () functionThe function of the format input function scanf () is to enter data from the keyboard,
1. Echo Function:The output function , which is a command, cannot return a value. Echo can be followed by a number of parameters, separated by semicolons, such as:echo $myvar 1;Echo, $myvar, "bold";2. print Function:is a function that returns a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.