Single quotes vs. double quotes in C or C++

前端 未结 13 1193
别那么骄傲
别那么骄傲 2020-11-21 07:14

When should I use single quotes and double quotes in C or C++ programming?

相关标签:
13条回答
  • 2020-11-21 08:15

    Single quotes are characters (char), double quotes are null-terminated strings (char *).

    char c = 'x';
    char *s = "Hello World";
    
    0 讨论(0)
提交回复
热议问题