Upwork OBJECTIVE-C TEST 2016

Hello Freelancer, Welcome to allupworktestanswers.com Here to get the OBJECTIVE-C TEST of Latest version 2016. We are ready here to provide your desire upwork test answer. We already tested all exam test information Available include on here. So Dear, Why Late? Read the below full exam test and get more information from our website.


1. What comments are supported in Obj-C?

Answers:
  1. // Line comments
  2. /* Block comments */
  3. # Line comments
  4. ; Line comments
  5. -[[ block comments ]]
2. What is a protocol?
Answers:
  1. A class that uses functions instead of methods
  2. A method signature
  3. A class signature
  4. An interface without an implementation
  5. None of the above
3. What is the isa variable in objects?
Answers:
  1. Object size
  2. Object memory footprint
  3. Object class identification
  4. Object serial numbe
  5. None of the above
4. In which version of Objective-C did the fast enumeration system appear?
Answers:
  1. 2.0
  2. 1.5
  3. 1.0
  4. 3.0
5. What is an IMP?
Answers:
  1. A special type used for computation
  2. An alias for SEL
  3. A preprocessor directive defined to the implementation name
  4. The C type of a method implementation pointe
  5. None of the above
6. What is the default visibility for instance variables?
Answers:
  1. @private
  2. @package
  3. @public
  4. @protected
  5. None of the above
7. What type of variable do you need to use to implement singletons?
Answers:
  1. static
  2. auto
  3. const
  4. volatile
8. What is a category?
Answers:
  1. A namespace
  2. A category is a way to add instance variables to a class which already exists
  3. A category is a group of classes
  4. A category is a way to add methods to a class which already exists
  5. None of the above
9. How do you allocate an object?
Answers:
  1. MyClass *obj = malloc(sizeof(MyClass));
  2. MyClass *obj = [MyClass alloc];
  3. MyClass *obj = alloc(MyClass);
  4. MyClass *obj = [MyClass new];
  5. None of the above
10. Is the following code a correct allocation?
MyClass myObj;
[&myObj aMessage];
Answers:
  1. Yes
  2. No
11. What is an autoreleased object?
Answers:
  1. A C object.
  2. A static object.
  3. An object that is garbage collected.
  4. An object that will be released when the current AutoreleasePool is deallocated.
  5. None of the above
12. Which of the following declares a protocol?
Answers:
  1. @proto ProtocolName
  2. protocol ProtocolName {};
  3. @protocol ProtocolName
  4. @interface <ProtocolName>
  5. @interface ProtocolName::Protocol
13. In which version of Objective-C did the properties system appear?
Answers:
  1. 3.0
  2. 2.5
  3. 2.0
  4. 1.5
  5. 1.0
14. What is the id type?
Answers:
  1. A generic C type that Objective-C uses for an arbitrary object
  2. A memory address type
  3. A type to hold serialized objects
  4. The type used for Classes
  5. None of the above
15. When using the garbage collector, which method, that is normally called without the collector, is not called on your objects where they are collected?
Answers:
  1. free
  2. dealloc
  3. destroy
  4. uninit
16. Which of the following creates a class that conforms to a protocol?
Answers:
  1. @interface ClassName [ProtocolName]
  2. @interface ClassName <ProtocolName>
  3. @interface ClassName < ProtocolName
  4. @interface ClassName::ProtocolName
  5. @interface ClassName(ProtocolName)
17. What is a @finally block?
Answers:
  1. A block that is executed when the program quits
  2. A block that is executed within a dynamic library when it’s unloaded
  3. A block of code that is run whenever an exception is thrown or not
  4. None of the above
18. What is true regarding @protected?
Answers:
  1. The instance variable is accessible within the class that declares it and within classes that inherit it
  2. The instance variable is accessible everywhere
  3. The instance variable is accessible only within the class that declares it.
  4. This is analogous to private_extern for variables and functions. Any code outside the class implementation’s image that tries to use the instance variable will get a link error
  5. None of the above
19. A class can conform to only one protocol.
Answers:
  1. True
  2. False
20. What class specifiers are supported?
Answers:
  1. FINAL
  2. STATIC
  3. FAST
  4. ITERATIVE
  5. There is no such thing as class specifiers
21. How do you throw an exception?
Answers:
  1. Raise Exception
  2. @throw exception
  3. RAISE exception
  4. THROW exception
  5. None of the above
22. What is nil?
Answers:
  1. The null object
  2. The null class
  3. It doesn’t exist
  4. None of the above
23. What does the following imply?
Worker *ceo = [[Worker alloc] init];
ceo->boss = nil;
Answers:
  1. That the ceo object is statically typed
  2. That the boss instance variable is declared @protected
  3. That the boss instance variable is declared @public
  4. That the ceo is in fact a structure
  5. This code is not correct
24. Can an exception caught in @catch be re-thrown?
Answers:
  1. Yes
  2. No
25. What is true regarding @public?
Answers:
  1. It doesn’t exist in Objective-C
  2. It breaks encapsulation
  3. It can be used only on singleton objects
  4. None of the above
26. Which of the following is false?
Answers:
  1. Method lookup is done at runtime
  2. When a method is called, the send is automatically available as the sender variable, like self or supe
  3. Messages can be sent to nil
  4. Methods in static libraries must be present at link time
27. What can you use to avoid the msgSend function overhead?
Answers:
  1. SEL
  2. IMP
  3. You can’t use anything
  4. None of the above
28. What does Obj-C not support?
Answers:
  1. Instance variables
  2. Class variables
  3. Static variables
  4. Automatic variables
29. What is not supported in Obj-C?
Answers:
  1. Recursive method call
  2. Variable argument count to method
  3. Byte manipulation
  4. Method argument default value
  5. None of the above
30. What will be the output of the following code?
static int
a (void)
{
printf (“an”);
return 0;
}
static int
b (void)
{
printf (“bn”);
return 1;
}
static int
c (void)
{
printf (“cn”);
return 2;
}
int
main (int argc, const char *argv[])
{
printf (“%d %d %d”, a (), b (), c ());
return 0;
}
Answers:
  1. a b c 0 1 2
  2. a b c 2 1 0
  3. c b a 0 1 2
  4. c b a 2 1 0
  5. None of the above


Finally no more words require about the OBJECTIVE-C TEST  information in this session of this content. If you are require knowing more, Please ask to us via our contact us form or comment box. Please make sure that, you don’t send Personal information via the Comment box.  Thank you very mutch for being with us.

0 comments: