About 69 results
Open links in new tab
  1. c - Qual a diferença entre "NULL", "\0" e 0? - Stack Overflow em …

    Jan 16, 2017 · Esse caractere é o terminador de string. Isto é importante já que C não guarda o tamanho da string de forma padronizada. No caso do char é possível usar apenas o 0 mesmo, …

  2. Para que serve o \0 | C: avançando na linguagem | Solucionado - Alura

    01/05/2018 Boa noite Ariel, O caractere "\0" (null) serve para identificar o fim de uma string, sem o "\0" o C não consegue definir o tamanho de uma string quando estamos fazendo um loop em uma string …

  3. c - O caractere nulo \0 é colocado automaticamente no fim da string …

    Sep 4, 2018 · A única forma de identificar o fim de string em C padrão é encontrar o terminador, portanto qualquer suposta string que não tenha um terminador é um erro. O scanf() pode corromper …

  4. c - What is the difference between NULL, '\0' and 0? - Stack Overflow

    This 0 is then referred to as a null pointer constant. The C standard defines that 0 cast to the type void * is both a null pointer and a null pointer constant. Additionally, to help readability, the macro NULL is …

  5. what is "{0}" in C? - Stack Overflow

    Aug 15, 2011 · However, the C standard states that if you don't provide enough elements in your initializer list, it will default-initialize the rest of them. So in your code, all elements of buf will end up …

  6. c++ - What's the real use of using n [c-'0']? - Stack Overflow

    Sep 15, 2011 · In C, '0' is an integer whose value represents the digit zero as a character, not the value 0, which would be the null character. Other answers have omitted this, but it's important to note that …

  7. objective c - What does \0 stand for? - Stack Overflow

    Jan 31, 2013 · Possible Duplicate: What does the \\0 symbol mean in a C string? I am new at iPhone Development. I want to know, what does '\\0' means in C, and what is the equivalent for that in …

  8. String termination - char c=0 vs char c='\0' - Stack Overflow

    Jun 6, 2013 · When terminating a string, it seems to me that logically char c=0 is equivalent to char c='\0', since the "null" (ASCII 0) byte is 0, but usually people tend to do '\0' instead.

  9. c - ASCII value = 0 and '\0' - Stack Overflow

    Jun 9, 2018 · "before null %c after null\n" "before null \0 after null\n" Both are stored in memory with an implicit \0 terminator at the end. The fact that the second has an explicit \0 character in the middle …

  10. What does the symbol \\0 mean in a string-literal? - Stack Overflow

    Nov 10, 2018 · Consider following code: char str[] = "Hello\\0"; What is the length of str array, and with how much 0s it is ending?