This examination assesses knowledge in Objective C and fundamental Object-Oriented Programming (OOP) concepts. It covers memory management, class categories, and initialization protocols, essential for developers to build robust software applications efficiently.
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
The variable can be accessed from other files by using an external declaration
The variable is a global variable
The variable has a default initial value of 0
All of the above
Rate this question:
Will always assign 100 to y
Will always assign 50 to y
Will assign either 100 or 50 to y, based on the value of x
No conclusions can be drawn
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
-1
0
1
This problem is too hard!
Rate this question:
True
False
Rate this question:
An integer that may either be an int or a long int
A type that might have a different size based on compiler options
Not an object
All of the above
Rate this question:
A variable name can't start with a capital letter
The data type
Statements in Objective-C should not be terminated with a semicolon
There's nothing wrong
Rate this question:
There is no difference
The former does not search the current source directory first
The latter does not search the current source directory first
The latter can not be used for importing system header files
Rate this question:
A message
A method
An object
None of the above
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
Defines a variable kStudents with a value of 50
Defines an identifier kStudents with associated text 50
Rate this question:
Autorelease it before returning
Retain it before returning
Release it before returning
Copy it before returning
Rate this question:
Alloc it
Autorelease it
Retain it
Release it
Rate this question:
Nothing is wrong
You can't initialize the variable i to 100
The value of j is not initialized
You can't declare and initialize a variable in the same line of code
Rate this question:
True
False
Rate this question:
An initialization method
An instance method
A class method
None of the above
Rate this question:
True
False
Rate this question:
Gives the number of characters in the string
Gives the number of characters in the string minus 1
Gives an error as there is no length method
None of the above
Rate this question:
True
False
Rate this question:
It's invalid and will cause the program to crash
It could be replaced by [f release] with the same effect
It should be followed by [f release] to avoid memory leaks
None of the above
It takes no arguments
It returns a Rectangle object
A corresponding method definition should appear in the implementation section
All of the above
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
Nothing is wrong
Everything is wrong! I hate Objective-C!
"sum" is a reserved word
A variable must be declared before it can be used
Rate this question:
-20
15
-15
12
Rate this question:
True
False
Rate this question:
Has the value 0 if x is non-zero
Has the value 1 if x is zero
Uses the logical negation operator
All of the above
Rate this question:
30
55
17
20
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
The newly-created string has been retained
The newly-created string has been released
The newly-created string has been autoreleased
None of the above
Rate this question:
The former checks the current directory as well as the system directories
The latter is recommended for use by Apple
The former prevents a file from being included multiple times
There is no difference
Rate this question:
1.0
1
5.0
The modulus operator can only be used with integers
True
False
Rate this question:
Its value will be set to 0 every time the method is called
Its value will be set to 0 only once when the program begins execution
Its value will not be retained through method calls
None of the above
Rate this question:
True
False
Rate this question:
Says that myObject is part of the Painting category
Says that myObject conforms to the Painting category
Says that myObject conforms to the Painting protocol
Is not valid Objective-C syntax
Rate this question:
Starts a category definition
Specifies a set of methods that conforms to 2 protocols
Both of the above
Makes no sense whatsoever
Rate this question:
True
False
Rate this question:
True
False
Rate this question:
Doesn't make sense
Defines a macro MIN if MIN is not previously defined
Defines a macro MIN no matter what
Rate this question:
200
300
205
The statement will generate a compiler error
Rate this question:
Quiz Review Timeline (Updated): Feb 9, 2024 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Wait!
Here's an interesting quiz for you.