iOS development needs to learn the main programming languages are: C language, C + +, objective-c, where C + +, Objective-c are based on the C language, derived from the C language. Therefore, the C language is the basis for developing iOS software.
The computer can only recognize data consisting of 0 and 1:0 and 1 instructions, 0 and 1.
Software is a collection of instructions, software installed on the hard disk, running in memory.
Machine language:
Assembly:
Advanced languages: Process-oriented and object-oriented
C language is a process-oriented language, and objective-c can be mixed with C.
Features of the C language:
1. Rich operators
2. Rich data types
3. Can operate the hardware directly
4. Efficient Target Code
5. Good portability
C language is composed of functions. Each function has its own name.
The main function is the entry for the entire program, and no matter how many functions are in the program, the main function must be the first one to execute.
Compile: Translate C source program into 0 and 1 that can be recognized by computer
Xcode3 using GCC,XCODE4 with LLVM compiler (front end with clang)
Enter: Cc–c file name in terminal. C, compile successfully, generate. O Target file
Link: Combine the. o file and the C-language function library to generate an executable file
In the terminal, enter: CC file name. O, the link succeeds and generates the A.out executable
After modifying the contents of the file, be sure to recompile, link, and then run
Modify executable file name: CC xxx.o-o filename, compile together, Link: cc xxx.c
Compile the file with absolute path, note where the target file is generated
iOS Basic Learning Day 2nd