Objective-C Flashcards

1
Q

What MAC program is used to create iPhone & iPad apps?

A

XCode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
1
Q

How is Objective C different from C?

A

Objective-C adds support for Object Oriented programming to C.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a function?

A

A list of instructions for the processor to execute.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a function?

A

A list of instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a program?

A

A collection of functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does the Compiler do?

A

The Compiler translates functions into machine code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Variable?

A

A place where one piece of data can be stored for later use.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is contained in a Variable?

A

A name, a type (such as a number), and sometimes a value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why declare a type for a variable?

A
  1. To let the compiler check your work for you and alert you to problems; and
  2. To tell the compiler how much memory to set aside.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

short, int, long

A

These 3 Types are whole numbers with no decimal point.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

float, double

A

These are Types for floating point numbers (numbers with decimal places).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

char

A

A one byte Type usually a character such as the letter “a”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are pointers?

A

A pointer holds a memory address. It is declared using an *. It does not hold the value. It holds the address to where the value is stored.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

struct

A

A struct is short for structure. It is a Type made of other Types. Example if you wanted to use a GeoLocation Type you would use 2 Float Types that contained a Latitude and a Longitude.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a Boolean variable?

A

A variable that can be true or false. It is expressed as BOOL in Obj-C.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a conditional operator and how does it use “?”

A

A conditional operator (or ternary operator) uses the if a=x else b=y structure by using the ? as a quick way to write the same as “a ? x : y” implying “: y” as else.

15
Q

What is in a Parameter in a function?

A

Each parameter has 2 parts: the type of data the argument presents and the name of the parameter. Ex: “int numDays” or “char *firstName”