C Strings
In C a string is an array of characters, but instead of having a size it is terminated by a null character.
char maxC = '\0' ; char *nextC = &buff[0] ; while (*nextC != '\0') { if (*nextC > maxC) { maxC = *nextC ; } ++nextC ; }
C startup with crt0
- Initialize the stack
- Initialize global variables
- Copied from program memory on the PIC
- Clear uninitialized global variables
- Load and link shared libraries
- Only for larger systems
- May be done by the operating system
- May be delayed until libraries are used
- Get ready to call
main
- Set up the parameters
- Call
main
- Return after the call