About 297,000 results
Open links in new tab
  1. c++ - What is a char*? - Stack Overflow

    Jun 14, 2022 · 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 …

  2. 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, …

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

    Nov 13, 2012 · 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 …

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

    Sep 27, 2011 · 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 …

  5. What is the difference between char array and char pointer in C?

    Sep 13, 2019 · As the initializer for an array of char, as in the declaration of char a [] , it specifies the initial values of the characters in that array (and, if necessary, its size). Anywhere else, it …

  6. c - char *array and char array [] - Stack Overflow

    char *array = "One good thing about music"; declares a pointer array and make it point to a (read-only) array of 27 characters, including the terminating null-character.

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

    Nov 10, 2009 · The difference here is that char *s = "Hello world"; will place "Hello world" in the read-only parts of the memory, and making s a pointer to that makes any writing operation on …

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

    Feb 24, 2015 · 50 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 …

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

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

  10. Difference between string and char[] types in C++ - Stack Overflow

    A char array is harder to manage than a string and certain functions may only accept a string as input, requiring you to convert the array to a string. It's better to use strings, they were made so …