约 330,000 个结果
在新选项卡中打开链接
  1. What is the difference between char array and char pointer in C?

    2019年9月13日 · 286 char* and char[] are different types, but it's not immediately apparent in all cases. This is because arrays decay into pointers, meaning that if an expression of type char[] is provided …

  2. c++ - What is a char*? - Stack Overflow

    The char type can only represent a single character. When you have a sequence of characters, they are piled next to each other in memory, and the location of the first character in that sequence is returned …

  3. c++ - Difference between char* and char [] - Stack Overflow

    2011年9月27日 · char *str = "Test"; is a pointer to the literal (const) string "Test". The main difference between them is that the first is an array and the other one is a pointer. The array owns its contents, …

  4. Difference between char* and char** (in C) - Stack Overflow

    15 char **x is a pointer to a pointer, which is useful when you want to modify an existing pointer outside of its scope (say, within a function call). This is important because C is pass by copy, so to modify a …

  5. What is char ** in C? - Stack Overflow

    2012年11月13日 · Technically, the char* is not an array, but a pointer to a char. Similarly, char** is a pointer to a char*. Making it a pointer to a pointer to a char. C and C++ both define arrays behind-the …

  6. c++ - char and char* (pointer) - Stack Overflow

    For cout << &q - operator << (ostream&, char* p) expects that p points to NULL terminated string - and &q points to memory containing "H" but what is after this character no one knows - so you will get …

  7. Difference between char and char* in c - CS50 Stack Exchange

    2015年2月24日 · The difference between char* the pointer and char[] the array is how you interact with them after you create them. If you are just printing the two examples, it will perform exactly the same. …

  8. c - Difference between char* and const char*? - Stack Overflow

    2012年3月23日 · What's the difference between char* name which points to a constant string literal, and const char* name

  9. c - What is the difference between char s - Stack Overflow

    2009年11月10日 · char *s = "hello"; So what is the difference? I want to know what actually happens in terms of storage duration, both at compile and run time.

  10. What is the difference between char * const and const char

    2009年5月21日 · char* const x is refer to character pointer which is constant, but the location it is pointing can be change. const char* const x is combination to 1 and 2, means it is a constant …