About 348,000 results
Open links in new tab
  1. 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 …

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

    Jul 25, 2011 · A char* stores the starting memory location of a C-string. 1 For example, we can use it to refer to the same array s that we defined above. We do this by setting our char* to the …

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

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

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

    Sep 27, 2011 · char str[] = "Test"; Is an array of chars, initialized with the contents from "Test", while char *str = "Test"; is a pointer to the literal (const) string "Test". The main difference …

  6. Difference between CR LF, LF and CR line break types

    Oct 12, 2009 · I'd like to know the difference (with examples if possible) between CR LF (Windows), LF (Unix) and CR (Macintosh) line break types.

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

    Oct 14, 2012 · For taking address of char q;. Of course you can take address of q: &q, and it type is char* p. But &q is different that p, and this q=*p just copies first character pointed by p to q, …

  8. c - The difference between char * and char [] - Stack Overflow

    Sep 4, 2014 · You are using the string %s specifier with a char data type (ie: printf("%s", 'c') is wrong). If you are printing a single character, you use the %c format specifier, and the …

  9. What is the difference between char, nchar, varchar, and nvarchar …

    Oct 6, 2008 · 8 The differences are: n [var]char stores unicode while [var]char just stores single-byte characters. [n]char requires a fixed number of characters of the exact length while …

  10. c++ - A value of type "const char*" cannot be used to initialize an ...

    Feb 13, 2018 · A const pointer to non-const char would be a char* const, and you can initialize a char* from that all day if you want. You can, if you really want, achieve this with …