UNIT 5 Flashcards
C++ is considered an efficient language for programming games because it is faster to write than other scripting languages. (T/F)
False, C++ is not a scripting language
The main difference between C and C++ is that C++ is a strongly-typed language with object-oriented features.
False, C++ can be seen as a class-based C
One of the weaknesses of C++ is that it requires the programmer to deal with too many low-level programming techniques. (T/F)
True
Dictionaries are data structures that are more efficient at mapping one set of keys to a set of data than linked lists. (T/F)
True
Unlike C or C++, Java does not have built-in dynamic data structures with pointers. (T/F)
True
Since Java programs run on virtual machines, they run faster than equivalent C++ programs.
False
If a program can be written in a scripting language, it will generally be much shorter than the same program written in C++
True
One disadvantage of scripting languages is the lack of automatic memory management. (T/F)
True
If your intention is to use scripting languages on a limited-memory console, then Lua is preferred over Python or Perl. (T/F)
True
You should not use Lua if you do not want your program to pause during execution. (T/F)
True
For rapid iteration in program development, scripting languages are preferred over C++ or Java. (T/F)
True
While dynamic data structures provide versatility and save memory, arrays are simpler to program, and do not result in fragmented memory. (T/F)
True
While dynamic data structures provide versatility and save memory, they are difficult to program and debug. (T/F)
True
Bit packing is a technique used to save memory when floating-point numbers are used. (T/F)
False, Integers are also one of the reasons. It allows you to use less space when you don’t have the need for so many bits (such as an integer requiring 32 bits) to represent the range of values in which you are interested.
Classes are abstract specifications of user-defined type that only allow one instance for each class. (T/F)
False, they allow as many instances as necessary