About 280,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 …

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

    } int main() { char *s = malloc(5); // s points to an array of 5 chars modify(&s); // s now points to a new array of 10 chars free(s); } You can also use char ** to store an array of strings. However, …

  3. 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 …

  4. 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

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

    May 21, 2009 · 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 …

  6. What exactly does a char* mean in C++? - Stack Overflow

    Your understanding is correct; a char* does point to a single char. The trick is that arrays are laid out contiguously in memory, so given a pointer to the first element of an array, you can access …

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

  8. c - Is it possible to convert char - Stack Overflow

    It sounds like you're confused between pointers and arrays. Pointers and arrays (in this case char * and char []) are not the same thing. An array char a[SIZE] says that the value at the location …

  9. Trying to understand CHAR(10) and CHAR(13) in SQL Server

    Aug 16, 2023 · I have read many articles explaining what CHAR (10) and CHAR (13) actually are. I have no problem with CHAR (10), it is simply a line feed or a new line. I do not understand …

  10. c - Return char []/string from a function - Stack Overflow

    Im fairly new to coding in C and currently im trying to create a function that returns a c string/char array and assigning to a variable. So far, ive observed that returning a char * is the most ...