objective c – What does stand for?

objective c – What does stand for?

The null character (also null terminator), abbreviated NUL, is a control character with the value zero. Its the same in C and objective C

The character has much more significance in C and it serves as a reserved character used to signify the end of a string,often called a null-terminated string

The length of a C string (an array containing the characters and terminated with a character) is found by searching for the (first) NUL byte.

In C, denotes a character with value zero. The following are identical:

char a = 0;
char b = ;

The utility of this escape sequence is greater inside string literals, which are arrays of characters:

char arr[] = abcdefghi;

(Note that this array has two zero characters at the end, since string literals include a hidden, implicit terminal zero.)

objective c – What does stand for?

The inside character literals and string literals stands for the character with the code zero. The meaning in C and in Objective C is identical.

To illustrate, you can use in an array initializer to construct an array equivalent to a null-terminated string:

char str1[] = Hello;
char str2[] = {H, e, l, l, o, };

In general, you can use ooo to represent an ASCII character in octal notation, where os stand for up to three octal digits.

Leave a Reply

Your email address will not be published. Required fields are marked *