The number of times the C language reads characters in notepad.
Program instructions:This program can calculate the number of times that a file named 1.txt appears.However, you can only query single English letters and punctuation marks. Chinese
Pthread_cond_wait () UsagePthread_cond_wait () is a method for implementing multi-thread synchronization in linux. It indicates that the thread can continue executing the code after pthread_cond_wait () only when the shared variable of a thread
[Original] NT System Information viewing tool: NtInfoGuy
Original article: [original] NT System Information viewing tool: NtInfoGuy
For windows, we have too many things to understand and recognize. Our extraordinary, unsatisfied nature drives us
Set the process name
Http://luoguochun.cn/2014/07/04/set-proccess-title/
How to Develop
When we usually run ps processes, the process title is the name of the program we entered and some parameters. This display method is not very intuitive. We
Parameter transfer:
PASS Parameters by value
ADT & black box
ADT: abstract data type, abstract data type
C can be used to design and implement abstract data types because it can restrict the scope of functions and data definitions. This
1. judge whether a number is a return number.
# Include
Int main (void)
{
Int a [100] = {0 };
Int n;
Printf ("input n :");
Scanf ("% d", & n );
Int I, k, j;
K = 0;
J = 0;
While (n! = 0)
{
A [k ++] = n % 10;
N =
1. c language declaration:All the strings you declare in the C language will have different meanings based on what you declared at the beginning! Your declaration on the string represents the attributes of this string! Whether it is a variable or a
Print the triangle code:
# Include
Int main (void)
{
Inti, j, n;
Printf ("inputn :");
Scanf ("% d", & n );
For (I = 0; I
{
For (j = I + 1; j
Printf ("");
For (j = 0; j
Printf ("*");
Printf ("\ n ");
}
Return0;
}
Multiplication table:
#
Single-chain table
1. Link Storage Method
A linear table stored by link is called a Linked List ).
The storage of the linked list is as follows:
① Use a group of arbitrary storage units to store the nodes of a linear table (this group of storage
Chapter 1 pointer ConceptA pointer is a special variable. The value stored in it is interpreted as an address in the memory.To understand a pointer, we need to understand the four aspects of the pointer: pointer type, pointer pointingType, pointer
Recently, someone accidentally asked this question about character encoding, So Baidu made a simple analysis by referring to the two documents.
**************************************** ******************************
Reference material 1:
1. Ordered stack structure
Typedef struct {SElemType data [MAXSIZE]; int top;/* for top stack pointer */} SqStack;
2. Construct an empty stack S
Status InitStack(SqStack *S){ /* S.data=(SElemType *)malloc(MAXSIZE*sizeof(SElemType)); */
I. Development Environment
ReadHat6.332-bit, Mysql5.6.15, gcc4.4.6
Ii. Compilation
Gcc-I/usr/include/mysql-L/usr/lib-lmysqlclient main. c-o main. out
-I: Specify the directory where the mysql header file is located (search for the header file
[This article is original to the Technical blog of Silence xuanyuan Sili .]
[This article is for reprinting. for reprinting, please indicate the source in the form of a link .]
[All the articles in this blog have been carefully organized by the
/* Question: // declare a struct type, struct _ AdvTeacher {char * name; char * tile; int age; char * addr; char * p1; // system reserved member domains char ** p2; // system reserved member domains}; a struct array (6 elements) must be defined, and
1. macro definition. Constant Definition
# Define MATH_PI 3.14 void defineH () {// The macro replaces the constant corresponding to the macro in the compilation phase, so it is very fast; printf ("% f", MATH_PI );}
. method definition
// Define the
1. Try to reduce the memory overhead when writing a program.
2. The content of the comment should be clear and accurate, so as to prevent ambiguity.
3. Do not use abbreviations for comments.
4. The comments should be similar to the
1. Good Programming habits should be followed when using variables.
defining meaningful variable names helps the program to be self-contained and reduce comments.
used as the identifier of the variable name. The first letter must be in lowercase.
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