C language tutorials required for iOS development-data types, variables, and operators

Source: Internet
Author: User

The basics of C language for iOS development-Introduction to data types and operators?

1. The TurboC variable must first define its data type before use. unspecified variables cannot be used. The variable type should be defined before the executable statement. In the preceding example, the first statement in the main () function is the variable definition statement, which must be placed in the first statement.

Before clrscr.

2. In TurboC, uppercase and lowercase letters are different. The uppercase and lowercase letters of the same letter indicate different variables.

3. The writing format of the TurboC program is very flexible and there are no special restrictions.

Example 1 The main function can be written as follows:

Main () {charc; clrscr (); gotoxy (12, 3 );
Puts ("WelcometouseTurboC2.0! "); Gotoxy (15,13 );
Printf ("-- Continue"); gotoxy (15, 15 );...}

In this way, although the syntax is correct, it is not very good to read, and the program level is not clear. Therefore, it is recommended that you use TurboC to program a line of statements, and the nested statements are indented backward. If you need to add comments to the program, you will understand this.

The general format of TurboC source code is:
Include files
Description of subfunction types
Full variable definition
Main ()
{
Local variable definition
<Program body>
}
Sub1 ()
{
Local variable definition
<Program body>
}
Sub2 ()
{
Local variable definition
<Program body>
}
.
.
.
SubN ()
{
Local variable definition
<Program body>
}
Sub1 (),..., subN () represents User-Defined subfunctions. The program body refers to any library function call statements and controls provided by TurboC2.0.

Process statement or other sub-function call statements.

C language is the basic language for iOS development. If you are interested, you can keep an eye on my new developments and share your development skills and skills with you every day. Attention to http://weibo.com/u/1796275655

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.