Initialise a null character in a string?? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

Initialise a null character in a string??

But But without using Null,\o or 0

18th Aug 2018, 5:58 PM
Rahul Jain
Rahul Jain - avatar
1 Resposta
+ 2
This is aĀ stringĀ literal, probably used in some earlier example. Sequences ofcharactersĀ enclosed in double-quotes ( " ) are literal constants. And their type is, in fact, aĀ null-terminated array ofcharacters. This means thatĀ stringliterals always have aĀ null characterĀ ( '\0' ) automatically appended at the end.
18th Aug 2018, 6:21 PM
Mayur Shedage
Mayur Shedage - avatar