A header file is a file with an. h extension that contains declarations and macro definitions for C functions, and can also be shared among multiple source files. There are two types of header files: The files that the programmer writes, and the
Speaking from the const int i
You know when we declare a variable like this int i; This i is possible to reset the assignment at it. As follows:
int i = 0;
/* ... *
/i = 20;/* Here is a new assignment. * *
But one day my program might
For a C language program, the memory space consists primarily of five parts of the code segment (. Text), the data segment (. data), the BSS segment (. BSS), the heap and the stack, where code snippets, data segments, and BSS segments are compiled
Is 1:sizeof a function?What is the difference between 2:sizeof and strlen?What is the value of 3:sizeof (int) (*P)?
Copy Code code as follows:
int a[10];
sizeof (a);//How much is it?
sizeof (A[10])/How much is it?
void f (int a[1
When the data is exported, for simplicity, the format of the output is often not specified, and the system takes a default format based on the type of data, but sometimes you want the data to be output in the specified format, such as requiring an
The so-called overload is to give new meaning afresh. Function overload is to give a new meaning to an existing function, so that the new function, so that a function name can be used to represent the functions of different functions, that is, "one
One or four object lifetimes and scopes
Stack ObjectImplicit call constructor (no explicit invocation in program)
Heap ObjectsImplicit call Constructor (no explicit call in program) to explicitly release
Global objects, static global objects
Why do you need an alias if you have a variable name? C + + to increase the reference type, mainly as a function parameter, to expand the function of the function of passing data.
So far we have described the two cases of function parameter passing.
In C, one of the common uses of function pointer variables is to pass the function name to the formal parameters of the other function as a function parameter. This allows you to call a different function in the process of calling a function based
C language Getopt () function: parsing command line argumentsheader File
#include
To define a function:
int getopt (int argc, char * const argv[], const char * optstring);
Function Description: getopt () is used to parse
C language Listen () function: Waiting for connectionheader file:
#include
To define a function:
int listen (int s, int backlog);
Function Description: Listen () is used to wait for the socket connection of the parameter
Recv () function:header file:
#include #include
To define a function:
int recv (int s, void *buf, int len, unsigned int flags);
Function Description: recv () is used to receive data from a specified socket on the
C language setsockopt () function: Set socket stateheader file:
#include #include
To define a function:
int setsockopt (int s, int level, int optname, const void * optval, Socklen_toptlen);
Function Description:
C language Signal () function: Set signal processing modeheader file:
#include
To define a function:
void (*signal (int signum, void (* handler) (int))) (int);
Function Description: Signal () sets the processing function
C language Umask () function: Set permissions mask when new files are createdheader file:
#include #include
To define a function:
mode_t umask (mode_t mask);
Function Description: Umask () sets the system Umask value
C language SetPriority () function: Set Program Process Execution priorityheader file:
#include #include
To define a function:
int setpriority (int which, int who, int prio);
Function Description: setpriority () can be
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service