FOP Exam

Description

Flashcards on FOP Exam, created by b3014292 on 15/05/2014.
b3014292
Flashcards by b3014292, updated more than 1 year ago
b3014292
Created by b3014292 over 10 years ago
176
0

Resource summary

Question Answer
When creating a function, if its not returning anything to another function, what is needed? void
How is a item passed as a source? Pass it by reference
When the system is counting (e.g. countGivenITemOnGrid) what procedure call will it be? int
If a array has a row and column, how many for loops will be needed? two, but one for loop must be within the other for loop (nested)
If there is a int procedure, what do you need at the end? return (you return the declared integer within the code)
In a case code, what is needed after the case? break;
For a array, where should the array start? 0 (e.g. name[0];)
How do you check for a empty letter? name ==""; (NOT name = "";)
Whats the difference between && and || && = and || = or
Can a return be in any loops or conditions? No It can only be in the procedure
Whats missing? for(pos = 0; pos < size; ++pos) for(int pos = 0; pos < size; ++pos)
if a variable is made a constant (const) what else is needed? const int i = 1;
What's the disadvantage with array? inserting and deleting a value can cause data loss
Whats the best way to store a data from a array? Saving it to a Text file
What is the advantage using a parameter? Its more secure and only functions that need it will be passed directly
For any function that has a input... You must set a precondition to reduce the possibility of errors
What happens to assert when its in release? It comments it out!
Write a C++ function enterPlayerName() that takes a parameter which allows text to be entered and submitted. void enterPlayerName(string& name){ cout << "Enter Player name: "; cin >> name; }
What is the difference between dx and dy? dx moves the object left and right dy moves the object up and down
To make the object disappear off the grid, what does the coordinates need to be? 0 This needs to be for both x and y axis (NOT dx and dy)
Whats the problem with this C++ code: Bool found = false; Code should look like this: bool found (false);
What are parameters? Parameters are individual data types that store information depending on what is assigned to them (e.g. bool option) - option would be a parameter.
Whats Missing? int main { //condition goes in here } No parameters in the main function int main()
Show full summary Hide full summary

Similar

Criminal Law
jesusreyes88
General Knowledge Quiz
PatrickNoonan
Geography - Unit 1A
NicoleCMB
Physics P2
Phoebe Drew
GCSE Chemistry C4 (OCR)
Usman Rauf
P1 quiz
I M Wilson
AS level Maths Equations to Remember
Gurdev Manchanda
An Inspector Calls- Quotes
ae14bh12
Leaving Certificate Japanese Kanji
Sarah Egan
Computer science quiz
Ryan Barton
Specifc Topic 7.4 Timber (Impacts)
T Andrews