CSC110 Mid-Term Study Sheet(this is an excellent topical study sheet for your exam)

(Revised 09/15/2018)

Closed Book (Given 1st one point each)

  1. Types of variables already built-in.
  2. The interpretation of the CodeBlocks editor’s asterisk at the top tab.
  3. The purpose of a keyword in C++
  4. *Two different computations using the / symbol (depending on the type of numerator and type of denominator).
  5. Does a C++ program always require a main() function?
  6. The purpose of the cout object.
  7. If a program statement is syntactically correct (compiles), does it is always logically run correctly.
  8. How the compiler treats all comments.
  9. *Did we use a built-in math function in Lab 1 for rounding down?
  10. The programming practice of a global variable.
  11. The programming practice of a global constant.
  12. A preprocessor using a header to include file input & output.
  13. Evaluate a C++ expression such as (4 + 9 / 5).
  14. What is the console output of: cout < keys[3];
  15. Groupingvariables together separated by commas between them for a single declaration.
  16. An example of coercion is:
  17. What is happening in the statement: sum = sum + 5;
  18. The shorthand using increment prefix or postfix operator, ++
  19. Explain the expression n--; or --n;
  20. The result of concatenating two strings (C++ syntax is shown).
  21. The “how” is shown in the ______,andthe “what” is shown in the ______.
  22. The result of the arithmetic operator % in C++?
  23. The C++ statement cout < (3 + 11);
  24. Integer division of two numbers.
  25. What a declaration statement does.
  26. What is at the end of a C++ statement?
  27. The C++ evaluation of an int divided by a double.
  28. A shortcut for writing an expression like this: sum = sum + 5;
  29. The operator used to force the conversion of a value to another type.
  30. The extraction operator used with cin.
  31. Relational expressions are evaluated to yield a ____ result.
  32. What can be used to alter the assigned operator priority and improve the readability of relational expressions?
  33. Which header file is used for the abs() function?
  34. If age is initialized to 38, the statement age == 40 has a numerical value of ____.

These are 3 points each. Shows similar examples of each question.

35-37. When the decimal number 251 is converted to base 2 the result is

38-40. The binary number: 1011011101000101 represents the hexadecimal number:

41-43. The binary number: 101011 is equivalent to the decimal number ______

44-46. Add these 5 bit binary numbers, then convert each to decimal and show the sums have equivalent answers.

01011 = ______

01101 = ______

4 point question:

47-50. Add these decimal numbers, then convert each to binary and show the sums have equivalent answers.

7 = ______

-4 = ______

CSC110 Mid-Term Open Book (Given 2nd you may use this annotated study sheet on the Open Book Exam. Most questions are 2 points.)

(Brookshear Textbook)

  1. Acronyms such as VLSI.
  1. Where is the most significant bit is located on a byte?
  1. What is RAM?

7.What is DRAM?

9. A gigabyte is how many bytes?

11. What is Mass storage and how is it referred to?

13. A major disadvantage of magnetic tape.

15. DVDs have what capacity?And what does DVD stands for?

17. Is Flash memory sensitive to physical shock in contrast to magnetic and optic systems?

19. ANSI adopted ASCII stands for ?

21. Unicode consists of ______different bit patterns, whereas ASCII only consists of ______bit patterns.

23. Two’s complement notation is a convenient method for ______.

25. How can binary numbers represent fractional values?

27. Contrast the Two’s complement notation and excess 8 notation.

Brookshear and Dale & Weems (2 pts each Multiple Choice)

29. *Convert a bit pattern into its equivalent base ten form:Use this example: 0011.101

31. *Convert this base 10 representation of a mixt fraction into its equivalent binary form. Use this example: 2 ¾

33. The maximum value of a variable of type (one of the ones in the book) is:

35. What is copying computer software without the permission of its creator called?

37. The name for harmful programs such as worms and viruses that may replicate themselves.

39. *The function bool IsLeapYear ( int year ) has a return type of ______.

41. A program called a(n) ______translates programs written in high-level languages into machine language.

43. Execution of a program always begins with the first statement of which function?

45. Give one example of a C++ Preprocessor.

47. Using this space write the C++ source code for a function to perform a simple task such as area.(signature is given)

49. (one point): Write only the one line prototype for the function in question 47,

50. (one point): Use a table to indicate the inputs and outputs of one of the simple circuits such as AND or OR.

input 1 input 2 output