Today, we have made the journey of developing the iPhone. First, we must master C and C before developing the iPhone application. Although I did not contact C but C ++ before getting started with development, I feel that they are mostly the same. One of my teachers said: As long as you understand a language, it is easy for you to master other hot languages.
First, we should first master the C language.
C language is a computer programming language. It features both advanced languages and assembly languages. It was launched by D. M. Ritchie of the Bell Research Institute in 1972. After 1978, C language has been transplanted to large, medium, small and micro-machines. It can be used as a working system design language, writing system applications, or as an application design language, writing applications that do not rely on computer hardware. It has a wide range of applications and has strong data processing capabilities. It is not only used in software development, but also needs to use C language for all kinds of scientific research. It is suitable for compiling system software, 3D, 2D graphics and animation. Specific applications such as single-chip microcomputer and embedded system development.
C is a high-level language. It combines the basic structure and statements of advanced languages with the practicability of low-level languages. C language can perform operations like assembly language on counterpoint, byte, and address. These three are the most basic work units of computers. 2. C is a structured language. The distinctive feature of structured language is the separation of code and data, that is, each part of the program is independent of each other except the necessary information exchange. This structured method makes the program layers clear and easy to use, maintain, and debug. C language is provided to users in the form of functions. These functions can be conveniently called and have multiple loops and conditional statements to control program flows, so that the program is fully structured. 3. Complete C language functions. It has various data types and introduces the pointer concept to improve program efficiency. In addition, the computing and logic judgment functions are powerful, allowing you to make decisions. 4. Wide application of C language. Suitable for a variety of operating systems, such as Windows, DOS, UNIX, and so on; also suitable for a variety of models. C language is superior to other advanced languages in scenarios where hardware operations are required. Some large applications are also written in C language.
The data type means that the storage objects are different and the memory space used is different, in order to make better use of the memory space. Especially for mobile phone development, we must pay attention to memory savings.
Variable naming rules:
1. Each variable must start with a letter or underline and consist of letters, underscores, and numbers;
2. the variables are case-insensitive.
3. The name cannot be the same as the data type.
The const-defined constants are the same before and after the data type.
Const int a = 10;
Int const a = 10;
Scanf obtains data from the keyboard
Before using a variable, you must first define the variable. Generally, it is used only after the variable definition statement. If you must use it before the variable definition statement, it must also be declared using the keyword extern.
Finally, write an array to output 9-9 Multiplication
// Day001.cpp: Defines the entry point for the console application.
//
# Include "stdafx. h"
Int main (int argc, char * argv [])
{
Int a [9];
Int B [9];
For (int I = 1; I <10; I ++ ){
A [I] = I;
B [I] = I;
}
For (int j = 1; j <= 9; j ++ ){
For (int z = 1; z <j + 1; z ++ ){
Int c = a [j] * B [z];
Printf ("% d * % d = %-3d", a [z], B [j], c );
}
Printf ("\ n ");
}
Return 0;
}
Author 10-3G-Cheng Long