Why special character (quotes " ) can be declare that char c = '"'

Правка en4, от shuneo, 2023-02-10 17:04:08
char c = '"';
// it is compiled and successed.

I have a question that: why we can char c = '"'; instead of using char c = '\"'.

I used to think that char c = '"' is wrong before.

Thank you alot

Теги c/c++, syntax

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский shuneo 2023-02-10 17:04:08 22
en3 Английский shuneo 2023-02-10 17:03:46 2
en2 Английский shuneo 2023-02-10 17:03:14 5
en1 Английский shuneo 2023-02-10 17:01:51 320 Initial revision (published)