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

    Jun 14, 2022 · char* represents the address of the beginning of the contiguous block of memory of char's. You need it as you are not using a single char variable you are addressing a whole …

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

    Dec 15, 2018 · char * is a pointer to a memory location. for char * str="123456"; this is the first character of a string. The "" are just a convenient way of entering an array of character values. …

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

    Sep 13, 2019 · char p[3] = "hello"? should be char p[6] = "hello" remember there is a '\0' char in the end of a "string" in C. anyway, array in C is just a pointer to the first object of an adjust …

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

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

    Sep 27, 2011 · const char *str = "Test"; The relevant section of the standard is Appendix C section 1.1: Change: String literals made const. The type of a string literal is changed from …

  6. 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, it …

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

    Nov 10, 2009 · char *s0 = "hello world"; char s1[] = "hello world"; assume the following hypothetical memory map (the columns represent characters at offsets 0 to 3 from the given …

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

    Oct 12, 2009 · CR and LF are control characters, respectively coded 0x0D (13 decimal) and 0x0A (10 decimal).. They are used to mark a line break in a text file.

  9. Difference between string and char [] types in C++

    Think of (char *) as string.begin(). The essential difference is that (char *) is an iterator and std::string is a container. If you stick to basic strings a (char *) will give you what …

  10. What's the difference between char and char* in C++?

    Sep 27, 2009 · So a char contains one character value like 'a' or 'Z'. char* points to a memory zone where you can access values char by char. A int variable contains one integer value like …

Refresh