IOS getting started tutorial (III)-c language features, ios getting started tutorial-c features

Source: Internet
Author: User

IOS getting started tutorial (III)-c language features, ios getting started tutorial-c features

// 3. C language features // 3.1 Function Definition // function return type function name (parameter) {// dosomthing //} This is the general function definition, // there is an old function definition method. The parameter void printMesg (msg, loopNum) int loopNum; int msg; {int I; for (I = 0; I <loopNum; I ++) {printf ("% d cycle % d \ n", I + 1, msg );}} // 3.2 Function declaration // The Declaration of the function is used for the use of the function before the definition of int add (int a, int B); // int main () {// int maxInt = add (3.3); //} int add (int a, int B) {return a + B ;}// parameter transfer, object-C uses the void swap (int a, int B ){ Int temp = a; a = B; B = temp; printf ("the value of a is % d, and the value of B is % d", a, B );} // For pointer-type variables, it also uses value transfer/* Draw is a class with two attributes: int a, int B; void swap (Draw * dw) {int temp = dw. a; dw. a = dw. b; dw. B = temp;} int main () {Draw dw = [Draw alloc] init]; dw. a = 6; dw. B = 9; return 0;} * // dw is a pointer variable. It is also passed as a value and copied as a pointer, // but it is strange that the pointer operation is a Draw object. No matter which pointer, the operated // is a Draw object. So the property change is taken for granted. // 3.4 recursive function // 3.5 internal function and external function/* internal function: static modification is used for definition and can only be called by the function in the current source file, therefore, it is called an internal function external function. It can be called by any source file without any modifiers, generally, all functions are external functions. * // Defines the extern function. If extern is omitted, the extern printRect (int height, int width) {for (int I = 0; I 


Getting started with ios

You can search for various videos on the Internet and see the forums. Qian Feng has a lot of videos on the Internet, starting from the C language and being comprehensive. All of them have helped you a lot.
 
How can I lay a good foundation for C language by studying iOS development?

With more than 10 years of development experience in the first-line industry, the Lou technology iOS R & D center has extensive cooperation in domestic and foreign markets, it has received wide acclaim from the industry for providing mobile platform R & D and services for the cooperation of many Fortune 500 multinational enterprises. At the same time, lanou has a variety of classic mobile platform games and application products, and has released more than 100 popular applications and games on Apple App Store and Google play, it has been rated as "excellent application" for many times ". When the course was opened, lanou fully considered students without programming basics. Therefore, the IPHONE offered a 72-class basic course, object-oriented BASICS (OC). non-computer students have a good programming Foundation after learning these two basic courses.

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.