- Pre-school Reminders
- In fact, iOS development is the development of Iphone\ipad software, and to develop a software, first of all to learn the programming language
- 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.
- From now on, sink your mind to learn the legendary C language and learn its grammar.
- Formal study before, first remind a sentence: Learning a language grammar is more boring things, very much like in the study of a few, it is impossible to learn C grammar process can immediately make some good-looking iphone software interface effect
- We should sink to live gas, so-called Kujinganlai, no grammar accumulation, how to write a good-looking interface?
- Computer and software knowledge
- Principles of computer operation
- Basic hardware: Hard disk, memory, CPU
- Coordination of operations between individual components (right)
- Computers can only recognize 0 and 1
- Directives consisting of 0 and 1
- Data consisting of 0 and 1
- Computer and Software connections
- Basic concepts of software: a collection of instructions
- Software Installation and Operation process
- Installed on the hard disk
- Running in memory
- Why develop software: Write instructions that can control your computer
- Computer language
- A language for dealing with computers
- Easy to write a series of instructions
- History of computer language
- Machine language
- Summary: All code is only 0 and 1, each instruction is called "Machine instruction"
- Advantages
- Code can be directly recognized by the computer, directly to the hardware, program execution efficiency is very high
- can directly hardware devices, such as disk et
- Disadvantages
- The program is all 0 and 1 of the instruction code, poor readability, but also error-prone
- The dependence on hardware is strong, so the machine language of different models of computers is not the same. That is to say, if 2 different models of machines want to achieve the same function, you need to write 2 sets of completely different code
- To memorize the meaning of all the instructions and instructions of the computer used, the instructions are many and difficult to remember.
- Use occasions
In summary, machine language is difficult to master and promote , now in addition to computer manufacturers of professionals, the vast majority of programmers have no longer to learn machine language
- Assembly
- Introduction: Replace machine instructions with English words and other symbols
- Advantages
- like machine language, direct access to , Control the various computer Hardware Equipment
- Low memory footprint and fast execution speed
- Disadvantages
- Different machines have different assembly language syntax and compilers, the code lacks portability, that is, a program can only be run on one machine, and can not be run on another machine
- Symbols are very many, difficult to remember, even the completion of simple functions also require a lot of assembly language code, it is easy to produce bugs, difficult to debug
- The hardware must be well understood, the development efficiency is low, the cycle is long and monotonous
- Use occasions
- Operating system kernel, drivers, microcontroller programs
- Encryption, decryption and decoding of software
- Manufacture and prevention of virus
- Debugging and analysis of the program
- Advanced language
- Introduction: Close to natural language
- Advantages
- Simple, easy to use, easy to understand, syntax and structure similar to general English
- Away from the direct operation of the hardware, so that the average person after learning can be programmed, without being too familiar with the hardware knowledge
- A program can also be run on different machines, with portability
- Disadvantages
- The program cannot be directly recognized by the computer and needs to be translated into binary instructions by the compiler before it can be run to the computer
- Category: C language, C + +, C #, Java, objective-c, etc.
- Comparison of three different languages
To write a program that calculates the last one, using machine language, assembly language, C language (high-level language), respectively
- Machine language: It's a heavenly book!!!
10111000 00000001
00000000 00000101
00000001 00000000
- Assembly language: Readability a little better, but trouble
MOV ax,1
ADD ax,1
- C Language: Streamlined, easy to understand
Up
- Introduction to C language
- The reason for learning C language first
- OC based on C
- OC and C's thought and grammar are different in many places, and OC can be mixed with C
- C is the classic of all programming languages, many high-level languages are derived from C language, such as C + +, C #, OBJECTIVE-C, etc.
- History
- The C language was invented in 1972 and was first used to rewrite the Uinx operating system (Unix was written primarily in assembly language, which laid the foundation of the operating system)
- With the success of Unix operating system, C language has been greatly promoted, has been used in large, medium and small, micro-host, is still the world's most popular, the most widely used high-level programming language One
- C language is a process-oriented language, non-object-oriented language
- Characteristics
- Rich operator
- Rich data types
- Can operate the hardware directly
- Efficient target Code
- Portability is good
- Main purpose
- Write system software, graphics processing, SCM program, Embedded system development
- Write a game plug-in
- Writing Android Programs
- Writing iOS programs
......
- Version issue
- 1983 National Bureau of Standards (American Nation Standards Institute, ANSI) set up a committee to begin work on the C language standard
- 1989 C language Standard is approved, this version of the C language standard is commonly referred to as ANSI C
- In 1999, ISO also revised the C language standard, on the basis of the basic retention of the original C language features, in response to the needs of the need to add some features, named C99
- December 8, 2011, ISO formally publishes the new International standard of C language draft: C11
C Language Section II overview