Programming Language Quiz 2

07/20/2001


BASIC Programming Language

Choose the most correct answer for each of the following for "BASIC":

* PRINT "Your name please"

  1. Will cause a line-feed to occur after the statement
  2. Will cause the cursor to stop at the end of the statement, with no space
  3. Will cause a carriage return after the statement
  4. Will cause both a carriage return and a line-feed after the statement

* PRINT TAB(18),"Ready";

  1. Will cause a tab over to column #18, and then print, with no carriage return
  2. Will cause a tab to column #18, then to the next field, then print
  3. Will tab to row #18, then print, and then pause with no carriage return

* PRINT USING(" ###.# &",AE,NM$);

  1. Will cause the numerical variable for AE, followed by the ASCII variable NM$
  2. Will cause the numerical variable for AE to be formatted to 3 numbers before the decimal, and limited to one rounded-up number following the decimal.
  3. Will not do a carriage-return line-feed.
  4. All of the above are correct

* The difference between LIST and LLIST

  1. Is the same principle as the difference between PRINT and LPRINT
  2. Is that LLIST is a "typo", and will not work

* Interactive vs Interpretive

  1. Are actually the same in purpose
  2. Interactive requires a Compilier
  3. Interpretive requires a Compiler
  4. Neither one requires a Compiler

* If a language allows immediate control through a "Command-Mode" it is said to be

  1. Interactive, in that mode
  2. Interpretive, in that mode
  3. Both are correct

* If a language requires "Compilation" to function, it is said to be

  1. Interactive, during the Compilation process
  2. Interpretive, during the Compilation process
  3. Both are correct

* A single command in BASIC

  1. Is actually comprised of many "Machine-Code" instructions
  2. Is actually a "Module" of one or more "Machine-Code" Instructions
  3. Is actually nothing more than simple calls to the current "Operating-System" or "BIOS"

C Programming Language

Choose the most correct answer for each of the following for "C":

* The language called "C" is called that because it actually followed an earlier language called "B" (True/False)

  1. Learning to Program in "C", compared to learning to program in "BASIC",
  2. Is usually more difficult because it has so many more variations in code structure
  3. Is actually much easier to learn, because it is so much more organized, structured, and "self-documenting" than BASIC.

* The construction and use of functions in "C"

  1. Is required by the type of normal format structure of "C"
  2. Allows a system of modules that are accessed from main
  3. Tends to result in more organized code
  4. Allows a system of modules that can be accessed from any other function
  5. All of the above are correct
  6. Only statements 2, 3, & 4 are correct

* In the use of the lettering in the terms, variables, and functions,

  1. They must be carefully considered, because some terms might be reserved
  2. Must be in expressed in lower case, because "C" is case-sensitive

* In the expression do_box(row, col)

  1. The row and column are passed as "row" and "column" to the function
  2. Only the values are passed to the function
  3. Neither the expressions "row, col", nor the values are passed, but actually the pointers to "row, col" are passed to the function.

* In the expressions "getche()" vs "x=getche()",

  1. There is no difference, they give the same result
  2. There is no echo on the first example
  3. "getche()" does not return the keyboard character, "x=getche()" does
  4. "getche()" is a "typo", and is an improper expression

* In the use of the expression (a=c) vs (a= =c)

  1. The expression (a=c) is a test of "a equal to c"
  2. The expression (a= =c) is an assignment
  3. The expression (a=c) is an assessment
  4. The expression (a= =c) is an assessment

* In the expression x = ++y (if "y" initially = 17)

  1. The variable "x" will take on the value of 18
  2. The variable "Y" will become 18
  3. The variable "x" will take on the value of 17