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

  2. c - char* and read-only memory - CS50 Stack Exchange

    I've read that when you assign a string literal to char* variable: The actual string literal "hello" is stored in the read only memory section. The variable "word" though, is just a pointer created in …

  3. c - Does const char* alias with char*? - Stack Overflow

    Jun 3, 2025 · Does const char* alias with char*? Your sample code aliases char with const char, not char * with const char *. That is, the a defined in main is defined with a type of char and is …

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

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

    I would like to understand how pointers work, so i created this small program. first of all i create a p pointer, which points to a char. The first question is at this point. If i create a pointe...

  6. British usage of “cha”, “char” or “chai” to mean “tea”

    By happenstance, I stumbled upon the words cha, char and chai in the dictionary today, all defined as meaning tea in informal British English. I lived and worked in London for some time, …

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

  8. How to convert an unsigned char to a string? - CS50 Stack Exchange

    Sep 20, 2021 · The code is essentially correct. The problem is the data that you chose to put in byte_loop [10]. It's pretty much all unprintable or invalid ASCII codes. Try using 0x61 through …

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

  10. How to pronounce the programmer's abbreviation "char"

    Mar 5, 2012 · In many programming languages, char is a type name for character values. The word character is pronounced with a [k] sound, but what about char? While trying to find the …