0. Know how the ASCII code character output characters, ASCII decimal, not directly ' \ (ASCII) ', to first convert the ASCII code to 8 binary, and then use ' \ '
1. Recalling while (): The loop terminates when the value inside the parentheses is 0 or ' + ' . (' 0 ' does not terminate in parentheses)
2. Review string Pointers:
Char *s= "ABCDEF";
Assign the address of a to the pointer s, so *s is a, and so on, * (s+1) is b,* (s+2) is C
3. Program
Code:
#include <stdio.h>
int main ()
{
Char *s= "ABCDEF";
while (*s)
printf ("%s\n", s++);
}
As a result, a string defined with a pointer can control where the string begins to print from the address. This position is not necessarily from the front to the back, but also from the back to the front.
If you encounter a problem string pointer, you can find the character in the string by pointer variable, but not the address of the character in the string to find the pointer/
An interesting code.