Prototype: extern char *strpbrk (char *s1, char *s2);
Usage: #include
Function: In string s1, find the position of the first character in the string S2 that matches any one character, NULL is not included.
Description: Returns a pointer to the
In the development of the program, the interface, openness is two very important aspects, at present, the UNIX system running the interface of the program is mostly rigid, and in the expansion of the function is not very convenient. So, can you
Related articles:
The background of C language embedded system programming cultivation
The software of C language embedded system programming cultivation
C Language Embedded system programming cultivation of memory
C Language Embedded system
int testA (void) { int b = 1 ; return b; } char * testB (void) { char str[] = "abc" ; return str; } int main() { printf( " the value of testA is %d \n", testA() ); printf( " the value of testB is %c ", *( testB() )
The main function is the entry point of C program, which is indispensable and cannot be duplicated.
The main function should return an integer value to the operating system, and a return of 0 indicates a normal end.
The main function used earlier
Like printf, this multimodal function is borrowed from the macros in Stdarg.h.
va_list : 用于定义遍历参数列表的指针; va_start : 让指针指向第一个参数; va_arg : 获取下一个参数,并向后移动一个位置; va_end : 释放指针,完成遍历.
1. Integer sum:
This example implements a summation of a series of
C language can not be separated from functions, the use of functions is also very convenient, but the use of functions have a price;
Especially in the repeated call, the function will be repeatedly pressure stack, out of the stack and waste some
Non-pointer parameters (that is, pass-value parameters) are not modified to the original value, and const does not make sense to it.
Const is used only for pointers.
1. The first usage: const type * variable:
This usage restricts the values that
1. Recursion is: The function itself calls itself
This is one of the simplest recursion, but it will always execute and can be terminated with CTRL + C.
#include void prn(void) { printf("C++Builder 2009\n");
(1) What is the byte alignment
If a variable occupies n bytes, the starting address of the variable must be divisible by n, that is, the starting address% n = 0, and for the struct, this n takes the data type of the member species that occupies the
int sigsuspend (const sigset_t *sigmask);
This function is used to suspend the process, and sigmask points to a set of signals. When this function is invoked, the signal in the signal set that the Sigmask points to is assigned to the signal mask.
To process a signal, you need to give the handler function that the system calls when this signal occurs. The corresponding handler function can be registered for a particular signal (excluding Sigkill and sigstop signals). After registering a
One, what is aligned, and why to align:
1. The memory space in modern computers is divided by byte, theoretically, it seems that access to any type of variable can start at any address, but the reality is that access to a particular variable is
Summarize the code implemented in this article into a single project. At present, it is only implemented to an intermediate stage, focusing on the implementation principle of COM interface, and does not include the part of the class factory. In the
String class(small blackboard hand without brackets small square brackets)String. Length after length without parentheses output int type character Segment bytesString. TrimStart ()-Remove the front spaceString. TrimEnd ()-Remove the trailing space
Loop type: For, while, foreachCyclic four elements: initial conditions---cyclic condition----State change1. ForFormat:for (initial condition; cyclic condition; state change){The loop body (break; jump out of the loop body)}ou gives the initial
Initial knowledge of C # program StructureFirst, write a C # program, comments:1. Writing ProceduresStatic void Main (string[] args)// write code output data { Console.WriteLine (") under the Mian method Hello world! "); //
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