From: http://blog.ednchina.com/jimmy_qiu/78829/message.aspx
How to Set 0 or 1 for a certain position?
Method 1: Write a macro to facilitate migration
# Define setbit (x, y) x | = (1 # Define clrbit (x, y) X & =! (1 Method 2: In addition to
# Called pound in English
In the macro definition of C language, one # represents stringized; two # represents concatenate
In macro definition, # is used to stringfication the macro parameters after it, that is, whether the macro variables are
Union ):I. Joint description and joint variable definitionUnion is also a new data type, which is a special form of variable.The description of union and the definition and structure of Union variables are very similar. The format is:Union name{Data
C's design principle is to use functions as the component module of the program. The main () function is called the main function, and a C program always starts from main ()FunctionStart execution.
1. Main ()FunctionFormatIn the latest c99 standard,
1. Nature of OOP
Design and extend your own data types.
2. c ++ naming rules:
1. Only letters, numbers, and underscores (_) are allowed ).
2. The first character cannot be a number.
3. Case Sensitive
4. names with two underscores (_) or underscores (
1. Increment and decrease Operators
Do not use multiple incremental and decreasing operations on the same value for the same statement.
For example, x = 2 * x ++ * (3-++ X );Different results will be generated in different operating systems (the
Q: What exactly does const in C language and C ++ indicate? How is the specific implementation mechanism implemented? This article will analyze the two issues and briefly explain the meaning and Implementation Mechanism of Const.
Problem Analysis
To
As we all know, Linux kernel is implemented by C language and a small part of Assembly. How can we ensure the clarity and correctness of the system organization in such a large system with a process-oriented C language? In fact, although the C
Reverse C ++
Over the years, reverse engineering analysts have been using the Assembly and C knowledge to reverse engineer most of the software. However, nowadays, as more and more applications and malware turn to C ++ for development, it is more
Author: jillzhang
Contact: jillzhang@126.com
This article is original and reposted. Please retain the source and author. Thank you.
In C and C # languages, float and double types are used to store data of the floating point type.32bit, double data
Sharpen the knife without mistakeThe old saying "don't cut firewood by mistake" is not suitable for C ++. If C ++ is compared to a knife, it will be a knife with excellent materials and shapes-just without a front. So we need to "Sharpen the knife ".
Q: Is a parent class having written a virtual function? Can a sub-class overwrite its function without the virtual function realize polymorphism?
A:Virtual modifiers are implicitly inherited. Virtual can be added or not added. The subclass space
Program 1
# Include "stdio. H"# Include "conio. H"
Void quick_sort (int * a, int left, int right );
Main (){Int I, j, temp;Int A [10] = {30, 50, 40, 10, 60, 70, 80, 20, 27,11 };For (I = 0; I Printf ("% d", a [I]);Printf ("/N ");
Quick_sort (A, 0, 9 )
C and C ++ languages have always been put together for example: C/C ++. As a result, Linus started to play C ++ with each other, and the users of these two languages began to intercept each other. I did not use C ++, but I was very happy to see it.
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