Section 1

Preview this deck

The 6 main categories of operators are: ____, _____, _____, ______, _______ and _______

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

4 years ago

Date created

Mar 1, 2020

Cards (93)

Section 1

(50 cards)

The 6 main categories of operators are: ____, _____, _____, ______, _______ and _______

Front

assignment, arithmetic, comparison, logical, bitwise and membership

Back

In the correct statement: int a = 5; 'int' is the ______, 'a' and '5' are the _______ and '=' is the ______. 'a' is known as the variable _______

Front

datatype, operands, assignment operator, identifier

Back

Objective-C is a _____ of the C language

Front

superset

Back

In computer science, the mathematical concept of "order of operations' is known as the "order of ______"

Front

precedence

Back

Pointers are declared by placing a(n) ___ between the type declaration and the variable name

Front

asterisk (*)

Back

The nine fundamental building blocks of Objective-C can be dividing into 2 categories: _____ and _______

Front

data...procedures

Back

Objective-C borrows much of its syntax from ______, one of the earliest object-oriented languages

Front

Smalltalk

Back

What is the intention of the Objective-C command: typedef double NSTimeInterval;

Front

Sets an 'alias' for double to better communicate the intent of a section of code.

Back

True or false: In Objective-C, floats are more commonly used that doubles

Front

true

Back

The first index in an array is valued at ____

Front

zero

Back

A variable that points to the memory address of another value

Front

pointer

Back

C-style strings are stored in an array of _____

Front

chars

Back

The _____ function can be used to print a message to the console

Front

printf( )

Back

Data (like nouns) represent the information we are processing and in Objective-C this made up of the four elements of _____, _____, _____, and ______

Front

C types, structures, enums, and objects

Back

If you are compiling an application with ARC, you _____ store Objective-C objects inside a _____

Front

cannot...struct

Back

_____ allow indirect access and modification of a variable's value.

Front

Pointers

Back

A struct may contain multiple ____ consisting of ______ data types

Front

fields...different

Back

Two additional foundational building blocks of Objective-C distinct from data and procedure type foundations

Front

Protocols and Categories/Extensions

Back

Rather than using arrays in Objective-C, we often are able to use it's collection classes of ____, ____ and _____ with _____ for strings

Front

NSArray, NSSet and NSDictionary with NSString

Back

True or false: char s1[5] = "test"; is a correct declaration/initialization for a C-style string

Front

true (C appends a null value automatically)

Back

____ provide a concise, elegant method for defining a discrete set of values

Front

Enumerations

Back

C-style strings always end with a ____ character

Front

null

Back

Write an Objective-C statement to create a literal array of integers named fibo containing 1, 1, 2, 3, 5

Front

int fibo[ ] = {1,1,2,3,5};

Back

The most flexible C data type: ______

Front

struct

Back

7 Common Integer data types

Front

BOOL, char, short, int, long, long long, NSInteger

Back

Create a CGRect object called r3 with an origin (top-left corner) of (100, 200), a width of 10 and a height of 20 using a helper function formulation

Front

CGRect r3 = CGRectMake(100, 200, 10, 20);

Back

_____ operators take 2 operands

Front

Binary

Back

A compiler feature that provides automated memory management

Front

ARC

Back

Objective-C binds methods and arguments at _____ instead of _______ time

Front

runtime...compile

Back

There are ____ fundamental building blocks in Objective-C

Front

9

Back

Three main categories of more complicated data structures (beyond simple or 'primitive' data types)

Front

pointers, arrays and structs

Back

KVO

Front

Key-value observing

Back

Data types are divided into two main categories: _____ and ______

Front

integer and floating-point

Back

Given: if(n % 2 == 0)isEven = YES; else isEven = NO; Rewrite using a ternary operator formulation

Front

isEven = (n%2 == 0)? YES : NO;

Back

a++; is an example of using a _____ operator

Front

unitary

Back

Write an Objective-C statement to create an array named myList to hold 10 integers

Front

int myList[10];

Back

3 Common Float data types

Front

float, double, CGFloat

Back

Create a CGRect object called r3 with an origin (top-left corner) of (100, 200), a width of 10 and a height of 20 using a struct literal formulation

Front

CGRect r3 = {{100,200}, {10, 20}};

Back

Procedures (like verbs) are processes that manipulate or transform data, and in Objective-C these 3 elements are _____, ______, and _____

Front

C operators, functions, and methods

Back

What is the result of the following code: int a=10; int b=&a; b=15;

Front

Changes the value of a to 15

Back

The process of setting or reading the value at an address pointed to by a pointer

Front

dereference (dereferencing)

Back

ARC

Front

Automatic Reference Counting

Back

a+b; is an example of using a _____ operator

Front

binary

Back

Integer data types come in _____ and _____ variants

Front

signed and unsigned

Back

KVC

Front

Key-value coding

Back

______ operators take a single operand

Front

Unitary

Back

_____ data types can be both positive and negative, while ______ data types are always zero or greate

Front

Signed...unsigned

Back

Placing a(n) ____ before a normal variable name gives it's address

Front

ampersand (&)

Back

Symbol used to denote a placeholder in a format string

Front

%

Back

In C, all functions pass their arguments by ____, which means the compiler makes local copies of those arguments

Front

value

Back

Section 2

(43 cards)

When creating a class header file, you begin with the _____ keyword and close with the _____ keyword

Front

@interface...@end

Back

Property attribute that causes the setter to store a zeroing weak reference to the assigned value

Front

weak

Back

A retain cycle occurs when...

Front

...two objects directly or indirectly refer to each other using strong references.

Back

Property attribute that causes the setter to store a copy of the assigned value

Front

copy

Back

Property attribute that synthesizes only a getter for the property

Front

readonly

Back

_____ allow you to add new methods to existing classes.

Front

Categories

Back

ARC is susceptible to ____ _____

Front

retain cycles

Back

Instance variables are ________ in iOS if ________ are used

Front

optional...properties

Back

Given: a Java command: graduationParty.addAttendeeWithDish("Aunt Jane", "deviled eggs"); Re-write in Objective-C.

Front

[graduationParty addAttendee: @"Aunt Jane" withDish: @"deviled eggs"];

Back

This symbol denotes a method as being a class method

Front

+

Back

Objective-C methods are called using ____ _____

Front

square brackets

Back

True or false: When declaring 'id' variables, we do not use an asterisk since the 'id' type is already defined as a pointer to an object

Front

true

Back

In a home building analogy, a ____ is the blueprint and the _____ is the house

Front

class...object

Back

Alternative code for: if(venue == nil){[organizer remindToFindVenueForParty];}

Front

if(!venue){[organizer remindToFindVenueForParty];}

Back

All objects are created on the _____

Front

heap

Back

_____ is one of the main advantages of object-oriented code and allows objects to 'hide away' much of their complexity, operating at times like a proverbial 'black-box'.

Front

Encapsulation

Back

Protocols are adopted by adding a _____- _______ list of protocols inside _____ ______ after the _______ _________ in a class's _______ block

Front

comma-separated....angled brackets... superclass declaration....@interface

Back

Property attribute that synthesizes both a getter and setter for the property

Front

readwrite

Back

A _______ method is one that is likely to be unsupported in the future (although it may work in the present). It's use should be discontinued.

Front

deprecated

Back

A ____ _____ is where you forget to free up memory

Front

memory leak

Back

In a format string, the place holder for an object is ______

Front

%@

Back

A ____ ____ is a situation where you free memory and then accidentally continue to use it

Front

dangling pointer

Back

To destroy an object, set the variable that points to it to _____

Front

nil

Back

The root class in Objective-C

Front

NSObject

Back

Consider: [NSString alloc]. 'alloc' is an example of a(n) ______ method rather than a(n) _______ method

Front

class...instance

Back

Initializer method traditionally begin with the _____ prefix

Front

init

Back

NSMutableArray *items = [[NSMutableArray alloc] init]

Front

Add a semicolon to the end of the message

Back

To create a "Command Line Tool" type project from a template you must choose _____ from the ______ menu in the template selection area

Front

Application...Mac OS X

Back

Correct the error: NSMutableArray items = [[NSMutableArray alloc] init];

Front

Replace 'items' with '*items'

Back

Correct the error: NSMutableArray items = [[NSMutableArray init] alloc];

Front

Swap the locations of init and alloc

Back

This symbol denotes a method as being an instance method

Front

-

Back

Property attribute where the setter stores the assigned value but does not perform any memory management. Should only be used for storing non-object data (int, float, etc). Objective-C objects should use strong or weak attributes instead

Front

assign

Back

Property attribute that synthesizes accessors that are not thread safe

Front

nonatomic

Back

When creating a class implementation file, you begin with the _____ keyword and close with the _____ keyword

Front

@implementation...@end

Back

Zeroing weak referencing should be used for _____ and _____ to prevent inadvertent retain cycles

Front

delegates ... data sources

Back

Xcode sequence to convert non-ARC apps to ARC

Front

Edit>Refactor>Convert to Objective-C ARC

Back

Objective-C's protocols are really about communicating _____ _______

Front

developer intent

Back

Rewrite as a 'foreach' construction:for(int i = 0; i < [items count]; i++){NSLog(@"%@", items objectAtIndex:i]);} Use an NSString called 's' as the variable.

Front

for(NSString *s in items){ NSLog(@"%@", s)};

Back

Square bracket syntax for calling a method

Front

[receiver message];

Back

Xcode sequence to examine an app for memory leaks or retain cycles

Front

Product>Profile>Leaks>Profile

Back

Property attribute that causes the setter to store a strong reference to the assigned value

Front

strong

Back

Given: [graduationParty addAttendee: @"Aunt Jane" withDish: @"deviled eggs"]; The 'receiver' is _______; the 'selector' is _________; the 'argument(s)' is(are) _______

Front

graduationParty...addAttendee:withDish...@"Aunt Jane" & @"deviledEggs"

Back

Each class should have a ______ initializer, a single method responsible for performing all of the object's setup and initialization. Typically it is the initializer with the largest number of arguments.

Front

designated

Back