C89 and C99 standard comparison

... 1, increase the restrict pointer C99 has added a restrict type modifier that is publicly applicable to pointers. It is the only way to initially access the object pointed to by the pointer, so only There is a restrict pointer expression to access an object. The restrict pointer is...


The difference between a reference and a pointer in c++

... The difference between a pointer and a reference: (1) When a reference is created, it must be initialized. The pointer can be initialized at any time. (2) Once a reference is initialized to point to an object, it cannot be changed to a reference to another object. The pointer can point...


The matlab contains the cell array automatically transferred to cpp

... . When using MATLAB to automatically convert CPP code, the cell array can also be automatically converted. Matlab version I use r2017a, the following notes, record their own learning steps 1, MATLAB automatic conversion, a lot of routines on the specific process network, this note...


[Baidu] Multiplication table

... 度度熊 and grandfather are playing a multiplication table game. The element of the i-th row and the j-th column of the multiplication table is i*j, and the multiplication table subscript number starts from 1, for example, the 2 × 3 multiplication table is 1 2 3 2 4 6 Grandpa is very clever...


The difference between typedef and #define

... typedef knows the definition of the class by name. But it's worth noting that it doesn't define a new type, but instead defines a different name for an existing type. This life is a little stupid, and often can't figure out the relationship with #define. Is it just that the new type...


Longest Increasing Subsequence HDU

... Idea: Because the number of changes is the same, the final contribution to LIS can only be 1 at most, so you can first find the length of the longest rising subsequence, then consider the number of each change. Whether its addition to LIS is 1 or 0. sets a[i] to indicate the length of...


c study notes -5 structure to achieve dynamic linked list

... here have to say a word, for the c pointer I think the best is the use of the linked list, there are many practical places # include <string.h> # include <stdio.h> //C language linked list Article //Structure realizes one-way linked list struct MyStruct { char name [ 20 ] ;...


c study notes -4 loop control statement if for while do

... long time ago, learn c language notes. Still the old routine, from the basic variable type, to the function definition step by step learning # include <stdio.h> # include <string.h> // control statement This is almost unchanged in different languages ​​ void test5 ( ) { int...


043: The longest and shortest word

... Total time limit: 1000ms Memory limit: 65536kB 描述 Enter 1 line of sentences (no more than 200 words, each word does not exceed 100) , only contains letters, spaces, and commas. A word consists of at least one consecutive letter, and spaces and commas are the spaces between words. Try to...


Re-recognizing the trinocular operator: ? :

... 三目 Operator is the conditional expression operator: ? : , its basic form is as follows: logical-OR expression ? expression : conditional-expression Everyone knows the operator Function, when the condition before ? is true, the expression before : is executed. If the condition is false,...