Recent project adjustments mainly involve changes to the length of database fields. In DB2, the only way to modify the length of a char field seems to be to delete the table and recreate it. Therefore, the question of which varchar and Char are used has been a headache. I read some information from the Internet and give a reply to this complicated question:
SQL S
= "Http://img1.51cto.com/attachment/201409/28/4828774_1411879928Pfrg.png" width= "311" height= " 236 "/>Changed from FF to 3f ...It seems that the command line is the most reliable.
Continue, there is no problem with the table that declares the for bit data:1, build the table:CREATE TABLEUsr. A_test(ID INTEGER not NULL,NAME CHARACTER (4) for bit data is not NULL);2. Insert Data:INSERT INTO USR. A_test (ID, Name) VALUES (3, X ' Ffffff20 ')3. View data:Select Hex (name) from Usr.a_test where
Tags: style color data ar time line databaseThe name of the student who queried the surname "Liu" and whose full name is 2 characters: SELECT Sname From Student WHERE Sname like ' Liu __ '; Why is there no result? I changed the two lines to a% after the results come out, is it not in the DB2 inside the horizontal line does not represent any single character? After the experiment found DB2 Wildcard "_"
I. Possible combinations:
(1) const char * P
(2) Char const * P
(3) char * const P(4) const char ** P
(5) Char const ** P
(6) char * const * P
(7) Char ** const P
Of cours
is stored in the pointer, and the address is 64-bit. So it takes 8 bytes. 2. In the x86 architecture machine, the memory padding is from low to high. So hello is stored in memory: Address: Content
0x400618:0x68 (ascii:h)
0x400619:0x65 (ascii:e)
0x40061a:0x6c (ascii:l)
0x40061b:0x6c (ASCII : l)
0x40061c:0x6f (ascii:o)
#include #includestring.h>intMain () {/*------------------------------------------------*/#if0Char*str ="ABCD"; //defines a char-type variable in the stack memory, with the first address of the string "ABCD" ,//but the content of the string "ABCD" exists in the constant area, the content is not variable,//The content is determined at compile time. Slow to run. *str ='C';//error, constant area content is immutable. printf"%s\n", str); Charst[ -] ="ABCD
1 The nature of the array
An array is a collection of multiple elements that are distributed in memory in an address-connected cell, so that you can access elements of different cells by its subscript.
2 pointers.
A pointer is also a variable, except that its memory unit holds an address that identifies another location. Because the address is also an integer, under the 32-bit platform, the pointer defaults to 32-bit.
3 pointer pointing.
The direct meaning of the point is the ty
Constraints for assigning values according to ansi c:
1. Both operands are pointers to compatible types with or without delimiters.
2. the type pointed to by the Left pointer must have all the qualifiers of the type pointed to by the right pointer.
1. Const char * and char *
The const char * type is: "pointing to a ch
First, start
One of the troubling questions today is the difference between Char and signed char, unsigned char. between two or three people
1.ANSI C provides 3 character types, namely Char, signed char, and unsigned char. Instea
Ansi c provides three types of characters: Char, signed Char, and unsigned char. There are only two types of characters like short and INT (INT is unsigned int by default ).
Each of the three occupies 1 byte. Therefore:
The value range of signed Char is-128 to 127 (with signs)Unsigned
Note: The const and typedef are very special when used together
Trap One:
Remember, a typedef is a new alias that defines a type, and unlike macro, it is not a simple string replacement. Like what:First define:typedef char* PSTR;And then:int mystrcmp (const PSTR, const PSTR);
is the const PSTR actually equivalent to the const char*? No, it's actually equivalent to char
ANSI C provides 3 types of characters, namely Char, signed char, unsigned charChar is equivalent to signed char or unsigned char, but it depends on the compiler!These three character types are stored in 1 bytes and can hold 256 different values.The difference is the range of valuesSigned
About wchar_t
In the C ++ standard, wchar_t is a wide character type. Each wchar_t type occupies 2 bytes and has a 16-bit width. Wchar_t is required for the representation of Chinese characters. Char, we all know, occupies a byte, 8-bit width.
The wprintf () function in the Standard C ++ and classes and objects in the iostream class library can provide operations related to the wchar_t wide character type.
Locale LOC ("CHS"); // defines the "reg
Reprinted from: http://kasonpt.blog.163.com/blog/static/169099697201171662830731/
Wchar_t *, wchar_t, wchat_t array, Char, char *, char array, STD: String, STD: wstring, cstring ....# Include // You must use MFC to use cstring and cannot contain # DEFINE _ afxdll# Include Using namespace STD;//----------------------------------------------------------------------
The prototype of the string function is char * strcpy (char * strdst, const char * strsrc)
Char * strcpy (char * strdst, const char * strsrc) // use const to indicate that the original string cannot be changed. In addition, use c
For some functions that need to pass in a parameter of char * temp pointer class;We define a char a[10] or char *a to pass in.ButIf the function is to change the value of the parameter you passed in, the incoming Char *a will burst the memory error, and Char a[10] will not.F
Label: style blog color Io OS AR for SP Div
Number of hexadecimal values: char * sum (int n, char * num1, char * num2)
Function:
The first parameter n represents the number of hexadecimal values. The maximum value is 36, from 0 to 9, and then A to Z represents 10 to 35.
Char * num1 and
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.