GoConqr has a new look! Let us know what you think.

Flashcards

Test II

Brooks Johnson CSC EGR GRE English 30 cards

Cards in this deck (30)

  1. 1Why Is Repetition Needed? (3)Repetition allows efficient re-use of variables
    Repetition allows processing of input when the
    number of input items is not known
    Repetition allows processing until a predefined
    limit is met
  2. 2while Looping Structure (2)-while (expression)
    statement
    -statement is called the body of the loop
  3. 3eof is a member of what data typeistream
  4. 4They syntax for the function eof isistreamVar.eof()
    Where istreamVar is an input stream variable such as cin
  5. 5The general form of the for statement isfor (initial statement; loop condition; update statement)
    statement
  6. 6The initial expression, loop condition, and update expression are calledfor loop control expressions
  7. 7whats in XXX if the output is 10 9 8 7... 1 for (i=10; XXX; i--) {cout << i}i>=1
  8. 8what does the "break" statement doexits the loop early, skips the remainder of the switch structure
  9. 9what does a "continue" statement doit skips the remaining statements and proceeds with the next iteration
  10. 10What are the 3 ways a while loop can be controlledcounter, sentinel, EOF
  11. 11what is a sentinela value that marks the end of input data
  12. 12a program can proceed in what 3 waysin sequence, selectively, repetitively
  13. 13What is a relational operatorA condition is represented by a logical (Boolean)
    expression that evaluates to true or false
  14. 14The = symbol is pronounced as what"is"
  15. 15what is the solution to comparing floating point equalityuse a tolerance value, example: fabs(x-y) < 0.000001
  16. 16how are strings comparedcharacter by character, if two strings have different lengths and the comparison is equal until the end the shorter string is less, if a mismatch is encountered those characters are compared
  17. 17what are logical (boolean) operators!, &&, ||
  18. 18associativity of relational and logical operators isleft to right
  19. 19what defines the order in which relational operators are executedprecedence
  20. 20what is short circuit evaluationevaluation of a logical
    expression stops as soon as the value of the
    expression is known
  21. 21what does this evaluate to and what is the correct way to write this 0 <= num <= 10true,
    0 <= num && num <= 10
  22. 22what is one-way selectionif (expression)
    statement
    The statement is executed if the expression is true
  23. 23what is two-way selectionif else etc.
  24. 24= in place of == is asilent killer, its not a syntax error it is a logical error, "is" versus "equivalent to"
  25. 25what predefined function is useful in stopping program execution when certain elusive errors occurassert
  26. 26how does the assert function workassert(expression);
    if expression evaluates to false the program terminates
  27. 27relational operators==, <, <=, >, >=, !=
  28. 28false always has a value of __ and true always has a __ value0, nonzero
  29. 29logical expressions evaluate totrue or false
  30. 30logical operators! (not), && (and), || (or)

Information

Description
GRE CSC EGR Flashcards on Test II, created by Brooks Johnson on 21/03/2023.
Created by
Brooks Johnson
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?