Ios_objective-c Test

Source: Internet
Author: User

  • 1. When the program in iOS loads Uiviewcontrolle correctly, which of the following four methods is executed first?A.viewvillappearB.viewdidloadC.viewdidappearD.viewwilldisappear
  • 2. What symbols are used for class methods?A.+B.-C.StaticD.*
  • 3. Which of the following methods in iOS cannot be called manually?A.DeallocB.ReleaseC.retainD.New
  • 4. Which of the following types cannot be placed in the Nsarray?A.NSStringB.NsintegerC.nsdictionaryD.Nsarray
  • 5. Which symbol is used for the output object in Object-c?A.@B.$C.&D.*
  • 6. How does the protocol approach define the requirements that must be fulfilled?A.@requiredB.@mustC.@optionalD.@should
  • 7. define an SEL a = @selector (b) in iOS, what should I fill in B? A. Method NameB. string of method namesC.sel Parameters
  • 8. Can the Object-c class inherit multiple classes?A. you canB. can not
  • 9. Float a = 4.45; int B = 2.1; int c = A/b;  NSLog (@ "%d", c); What is the output, please?A.1B.2C.4D.5
  • What design mode does KVO belong to?A. Observer PatternB. Proxy ModeC. single-case modeD. Visitor Mode
  • One. int a = 5; int B = 6;  int c = A + b++; How much is C equal to?A.5B.6C. OneD.
  • Object-c, calling C + + code needs to change the file suffix toA.. MMB.. MC.. CD.. cpp
  • Is there a virtual base class in cocoa?A. there areB. No
  • int a = 3;  int b = a++; int c = ++b; int d = A + B + + C + +; NSLog (@ "%d", d); What is the output, please?A.3B.6C.9D.
  • UIView * view = [[UIView alloc]initwithframe:cgrectmake (0, 0, 20, 40)]; What is the width of the view?A.0B.C.D.
  • 16. Which of the following ingest files does not cause duplicate inclusions?A.#importB.# includeC.@classD.@include
  • . Xcode Select the simulator to compile, which is the binary file suffix generated in the products? a. . App b. . apk c. . IPA Label style= "font-size:22px" >d. . lib

    error should be selected: A. App

  • . int a = 28;  int b = 0;  for (int i = 0; i<2; i++) { &N Bsp;b = a%3;  b++;   ++b;   }  nslog (@ "%d", b);   how much is the output a. 1 b. 2 c. 3 d.
  • What is the opposite of retain semantics in object-c?A.DeallocB.ReleaseC.autoreleaseD.Delete
  • int m = 0; int n = m++;  m = n++; What is the result of M?A.0B.1C.2D.3

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.