The followingCodeWhat are the results?
# Include int main (void) {int I = 1; int * CP = & I; printf ("% d \ n", ++ * CP ++ ); return 0 ;}
# Include int main (void) {int I = 1; int * CP = & I; printf ("% d \ n", ++ (* CP) ++ ); return 0 ;}
Method 1:
# Include # define print (format, value) \ printf ("the value is" format "\ n", value); int main (void) {int x = 6; print ("% d", x + 2); Return 0 ;}
Running result:
The value is 8
Method 2:
# Include # define print (format,
R: open a read-only file, which must exist.
R + has read/write attributes. It is written from the file header and retains the content not covered in the original file.This file must exist.
W. Open and write only the file. If the file exists,
Today, in order to get a complete idea about array initialization and declaration in C, for example, declaring only one array char STR [20], what is the content in Str? I used vc6 ++ and debug to see the-56 ELE. Me ASC code. Later I consulted a
I recently encountered a small problem when I was doing the Sichuan University retest questions. Something strange happened.
Is about
Char C;
C = getchar ()
Or
Char C;
Scanf ("% C", & C );
Both functions can obtain the input characters
Today was originally Saturday. Mint boss came to work last night, just to watch the book quietly here. I went to the bookstore last night to buy three books. A c, a C ++, and an EJB. To learn C ++ well, I started to learn it from C. Wang Meng said
the alloca () function is used to allocate size bytes of memory in the stack, so the space is automatically released when the function returns. Alloca Function Definition and library header file:
/* Allocate a block that will be freed
Place the array in the struct, and directly use "=" to copy all values in the array to other arrays of the same type.
# Include struct array_tag {int A [10] ;}; int main (void) {struct array_tag M ={{ 1, 2, 4, 5, 6, 7, 8, 9, 0 }}; int I; for (I =
Insert a single linked list. I think it should be the most basic thing. Today we will introduce a concise version.
Requirement: Insert a node to the correct position of the linked list. The values of the nodes in the current linked list are
In C #2.0, subthreads cannot operate components, because components are generated by the main thread. All explicitly generated threads in the main thread are called subthreads. In method 2, the delegate solution is provided below, which is the
Directly run the Code:
# Include # include int main (void) {// create n * n matrix int N for the user input value; // count int COUNT = 1 from 1 for the snake; // A [x] [Y], X is the first subscript of a two-dimensional array, and Y is the second.
C99 specifies that int, unsigned int, and bool can be bit domain types. However, almost all compilers have extended this to allow the existence of other types.If the struct contains a bit-field, the following rules are summarized: (the following
Macro # line changes the content of _ line _ and _ file _. They are pre-defined identifiers in the Compilation Program. The basic format is as follows: #Line number ["FILENAME"]
The number is a positive integer, and the optional file name is
This article is reproduced in: http://hi.baidu.com/bali_bao/item/f90a4f76121b113a6dc37c4b
Printf () Usage
I. The printf () function is a style-based output function, which is generally used to output messages to the standard output device
# Include # define peach inttypedef int banana; int main (void) {unsigned peach A; unsigned banana B; return 0 ;}
In the above Code,
Unsigned banana B;
An error occurs when compiling this row.
Because typedef is a completely "encapsulated"
# Include
# Include
# Pragma comment (Lib, "wsock32.lib ")
Using namespace STD;
Int main ()
{
Wsadata data;
// Load the class library
Wsastartup (makeword (1, 1), & data );
// Initialize the socket
Socket serversocket = socket
Some knowledge of the wild pointer:
In my understanding of the wild pointer, I think the value of the wild pointer is a pointer variable and its value is uncertain. In this way, when you operate on the memory address specified by this variable,
function declaration
I recently read the C language, which is very confusing. In some cases, function declaration is not available in some cases.
I checked the teaching material, made a summary, copied the pen, and recorded it online. I have
Recently, I used C # To write winform. When I was writing Java, I used the log to make an error in try and catch. This way, I have configured the log, you can quickly find the statement block with the error and locate the error.
Now I have used
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