Tác giả Matt Mahoney, mmahoney@cs.fit.edu.
Đội ngũ giảng viên TechMaster biên soạn, định dạng lại cho dễ đọc hơn.
PREPROCESSOR
// Comment to end of line
/* Multi-line comment */
#include <stdio.h> // Insert standard header file
#include "myfile.h" // Insert file in current directory
#define X some text // Replace X with some text
#define F(a,b) a+b // Replace F(1,2) with 1+2
#define X
some text // Line continuation
#undef X // Remove definition
#if defined(X) // Condional compilation (#ifdef X)
#else // Optional (#ifndef X or #if !defined(X))
#endif // Required after #if, #ifdef
LITERALS
255, 0377, 0xff // Integers (decimal, octal, hex)
2147483647L, 0x7fffffffl // Long (32-bit) integers
123.0, 1.23e2 // double (real) numbers
'a', '141', 'x61' // Character (literal, octal, hex)
'n', '\', ''', '"' // Newline, backslash, single quote, double quote
"stringn" // Array of characters ending with newline and
Bình luận