Shell programming --- awk command explanationAwk ProgrammingAwk is a programming language. Gawk is the latest version. The current linux version uses gawk.Awk is a soft link of gawk.How awk worksBEGIN # Run the command before the object row is
1.
Block "unused Parameters" Warning
This macro is used in ob_define.h in oceanbase to forcibly convert incoming data to void type.
#ifndef UNUSED #define UNUSED(v) ((void)(v)) #endif
This macro is mainly used to block the warning of
The complete format of printf format control. For more information about learning php, see. The complete format of printf format control:
%-0 m. n l or h characters
The following describes the composition formats:
① %: Indicates the starting symbol
usually in the Linux platform when writing code, although GDB debugging function is very powerful, but many times I prefer to call the system printing function to debug my program, but the direct call will inevitably appear very stupid (China
Need to print a fixed-length characterIt is generally possible to do this:
void Str_print (const char* str, unsigned int str_len)
{
int i=0;
for (; i
printf ("%c", Str[i]);
printf ("\ n");
}
But a single
Chapter Questions1. The preprocessor defines 5 symbols, gives the file name to compile, the current line number of the line, the current date and time, and whether the compiler is an ANSI C compiler. Cite one possible use for each symbol.Answer:
Data type
Constant
Variable
printf Function Introduction
scanf function Introduction
Operator
Data typeThe data type is how the data is stored in memory.There are 5 Big data types in C: Basic type, constructed type, pointer
In the development of C + + programs, generally in the throughput, concurrency, real-time high requirements. When designing a C + + program, the following points can be summed up to improve efficiency:
Concurrent
Asynchronous
Cache
C/C ++ supports variable parameter functions, that is, the function parameters are uncertain.
I. Why do I need a Variable Parameter Function?
Generally, when programming, the number of formal parameters in the function is usually determined, and
The full format of printf format control:
%-0 M.N L or H format characters
The following describes the items that comprise the format description:
①%: Represents the starting symbol for the format description, which is indispensable.
②-:
(Conversion) PHP (similar to other languages) encoding standards, php EncodingTo improve work efficiency, ensure development effectiveness and rationality, and maximize the readability and reusability of program code, and improve communication
Directory? Pre-knowledge? Data type? Extended knowledgeOnePre-knowledgeIf the reader has the basis of other programming languages, such as: C language. You will find that Python does not need to declare its data type when using "variables". Even in
#include
#define FORMAT "%s! C is cool!\n "
int main (void)
{
int num=10;
printf (Format,format);
return 0;
Output is%s! C is cool!
! C is cool!
#define FORMAT "%s! C is cool!\n "incoming program: printf (format,format); changed to: printf ("%s! C
Why do we have to develop our own coding standards?
When we write code, a good coding code, for us to be able to play a lot of the effect of no intention. At least there will be the benefits:
1, improve our coding efficiency. Uniform code is
Phpprintf output format instructions. The complete format of printf format control: %-0m. nl or h format characters are described as follows: ① %: indicates the start symbol of the format description, which is indispensable. ② Complete formats of
Instance
Output formatted string:
Definition and usage
The printf () function outputs a formatted string.
The Arg1, arg2, + + parameters are inserted into the percent sign (%) symbol in the main string. This function is executed step-by. At the
Binary Tree creation code ==>c++ Creating and traversing a binary treeDepth-First traversal: a node that traverses a tree as deep as the tree, searching the branches of the tree as deeply as possible.Depth-first traversal of binary treevoid
#define name [string]Macro definition. When compiling preprocessing, all occurrences of macro names in the program are replaced with strings in the macro definition... Variable parameter, used to pass a mutable argument list, you can use __va_args__
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.