• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/34

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

34 Cards in this Set

  • Front
  • Back
How are comments created in Xcode?
// is used for comments that are contained on a single line; /* and */ are used to start and end comments that exceed a single line.
What is the difference between a program and an application?
A program is a set of code that causes the computer to execute instructions; an application has a graphical user interface.
What must every code statement written in C end with?
A semicolon.
What is a command-line tool?
A program with no graphical interface that runs in the terminal.
What is a daemon?
A program with no graphical user interface that can run for days in the background (e.g., pboard or mailer-daemon).
What is a function?
A list of instructions the computer is to execute. C and Objective-C programs call on the function called main when a program beings.
Why are program comments useful?
They can be used to document program logic, prompt programmers to return to specific program sections for debugging, etc.
What is a program?
A collection of functions, which are a list of operations the processor is to execute.
What is a variable?
A place in which data can be stored for later use in a program. The variable will have a value (e.g., 23.2).
How is a new variable created?
Its type must be declared (e.g., float weight;).
Why must each variable type be declared?
The type helps the compiler check for errors. It also tells the compiler how many bytes of memory to reserve for that variable.
What are five of the most commonly used variable types?
short, int, long, float, double.
Which variable types are short, int, and long?
Whole numbers (no decimal point).
What variable types are float and double?
Floating point numbers (decimal points). In memory, floats and doubles are stored in mantissa/exponent fashion (e.g., 346.2 is 3.462 x 10 squared).
What is char?
A one byte integer we consider to be a character, such as 'a'.
What is a pointer?
A pointer holds a memory address. It is declared using the asterisk. (E.g., int * holds a memory address for an int value—but not the value itself).
What is a struct?
A struct(use) is a type made of other types. New struct definitions can also be created (e.g., GeoLocation type can contain the two floats latitude and longitude).
How is an if/else statement constructed?
if (conditional) {
} else {
}
How can true and false be expressed in if/else and similar program statements?
False is always expressed via 0; while any number not 0 can be used for true, 1 is very common.
What does < mean?
The number on the left is less than the number on the right.
What does > mean?
The number on the left is greater than the number on the right.
What does <= mean?
The number on the left is less than or equal to the number on the right.
What does >= mean?
The number on the left is greater than or equal to the number on the right.
What does == mean?
The number on the left is equal to the number on the right.
What does != mean?
The number on the left is not equal to the number on the right.
How do = and == differ?
The single = means to assign value, while == refers to equality.
What does && mean?
The logical AND, it means that a statement is true only if both conditions are true.
What does || mean?
The logical OR operator, it means the statement is false only if both conditions are false.
What does ! mean?
The logical NOT operator, it means true becomes false, or false becomes true.
How is logical OR different in Objective-C than in some other languages?
There is no logical exclusive OR in Objective-C.
What is a boolean variable?
A variable that can be true or false.
How is a boolean value identified in most languages, and how does this differ in Objective-C?
Most languages use int for a boolean value; Objective-C uses BOOL (which is an alias for an integer type).
What type of statement can be used for situations in which there are more than two possibilities?
The else if statement.
When is the conditional, or ternary operator used?
Denoted by ?, the conditional/ternary operator is used whenever a value is assigned to a variable based on a conditional.