关于字符常量的几个小问题

关于字符常量的几个问题
注册了好久,也没咋看过问过。现在有些问题想请教大家,希望大家帮忙:
1、比较具体:
char c;
c='*';或者c=‘\*’;
c的值是一样的,为什么明明多了"\"还一样,其他字符,诸如字符?,也是无论加不加"\",值都是一样的。
2、一般情况下(或者大多数情况),定义一个字符是用int好还是char好?
------最佳解决方案--------------------
引用:
注册了好久,也没咋看过问过。现在有些问题想请教大家,希望大家帮忙:
1、比较具体:
char c;
c='*';或者c=‘\*’;
c的值是一样的,为什么明明多了"\"还一样,其他字符,诸如字符?,也是无论加不加"\",值都是一样的。
2、一般情况下(或者大多数情况),定义一个字符是用int好还是char好?

1. '\*'叫多字节字符,类型属于int,而对于c='\*'这样的行为,结果是把'\*'的LSB赋予c。
2. 这个不用说什么了吧,对于字符,当然是char。


------其他解决方案--------------------
c语言中有些字符属于不可打印字符,不可打印的字符实际上是不可显示的字符,如退格符,回车符等。还有一些在语言中比较特殊的字符,如单双引号,星号等。不可打印字符或者特殊字符都要用转义字符来表示,转义字符都以反斜线开始表示。
楼主可以理解‘*’和‘\*’是同一个字符用在不同场合的不同表示形式,但是‘\*’貌似并没有实际的意义,所以其对应的sacii吗和‘*’一样。然而‘\n’有明确的意义,所以其对应的ascii的吗值和‘n’是不一样。
反斜杠只是将同一个字符用不同的形式表示出来以适应不同的场合,当加了反斜杠的字符其他的意义时,其对应的ascii值和原字符对应的值会有所不同。
个人理解
------其他解决方案--------------------
C++ Character Constants
Character constants are one or more members of the “source character set,” the character set in which a program is written, surrounded by single quotation marks ('). They are used to represent characters in the “execution character set,” the character set on the machine where the program executes.

Microsoft Specific 

For Microsoft C++, the source and execution character sets are both ASCII.

END Microsoft Specific

There are three kinds of character constants: 

Normal character constants


Multicharacter constants


Wide-character constants 
Note   Use wide-character constants in place of multicharacter constants to ensure portability.

Character constants are specified as one or more characters enclosed in single quotation marks. For example:

char ch = 'x';          // Specify normal character constant.
int mbch = 'ab';        // Specify system-dependent
                        //  multicharacter constant.
wchar_t wcch = L'ab';   // Specify wide-character constant.

Note that mbch is of type int. If it were declared as type char, the second byte would not be retained. A multicharacter constant has four meaningful characters; specifying more than four generates an error message.

Syntax

character-constant :

'c-char-sequence'
L'c-char-sequence'

c-char-sequence :

c-char
c-char-sequence c-char

c-char :

any member of the source character set except the single quotation mark ('), backslash (\), or newline character
escape-sequence