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"
- Will cause a line-feed to occur after the statement
- Will cause the cursor to stop at the end of the statement, with no space
- Will cause a carriage return after the statement
- Will cause both a carriage return and a line-feed after the statement
* PRINT TAB(18),"Ready";
- Will cause a tab over to column #18, and then print, with no carriage return
- Will cause a tab to column #18, then to the next field, then print
- Will tab to row #18, then print, and then pause with no carriage return
* PRINT USING(" ###.# &",AE,NM$);
- Will cause the numerical variable for AE, followed by the ASCII variable NM$
- 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.
- Will not do a carriage-return line-feed.
- All of the above are correct
* The difference between LIST and LLIST
- Is the same principle as the difference between PRINT and LPRINT
- Is that LLIST is a "typo", and will not work
* Interactive vs Interpretive
- Are actually the same in purpose
- Interactive requires a Compilier
- Interpretive requires a Compiler
- Neither one requires a Compiler
* If a language allows immediate control through a "Command-Mode" it is said to be
- Interactive, in that mode
- Interpretive, in that mode
- Both are correct
* If a language requires "Compilation" to function, it is said to be
- Interactive, during the Compilation process
- Interpretive, during the Compilation process
- Both are correct
* A single command in BASIC
- Is actually comprised of many "Machine-Code" instructions
- Is actually a "Module" of one or more "Machine-Code" Instructions
- 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)
- Learning to Program in "C", compared to learning to program in "BASIC",
- Is usually more difficult because it has so many more variations in code structure
- 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"
- Is required by the type of normal format structure of "C"
- Allows a system of modules that are accessed from main
- Tends to result in more organized code
- Allows a system of modules that can be accessed from any other function
- All of the above are correct
- Only statements 2, 3, & 4 are correct
* In the use of the lettering in the terms, variables, and functions,
- They must be carefully considered, because some terms might be reserved
- Must be in expressed in lower case, because "C" is case-sensitive
* In the expression do_box(row, col)
- The row and column are passed as "row" and "column" to the function
- Only the values are passed to the function
- 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()",
- There is no difference, they give the same result
- There is no echo on the first example
- "getche()" does not return the keyboard character, "x=getche()" does
- "getche()" is a "typo", and is an improper expression
* In the use of the expression (a=c) vs (a= =c)
- The expression (a=c) is a test of "a equal to c"
- The expression (a= =c) is an assignment
- The expression (a=c) is an assessment
- The expression (a= =c) is an assessment
* In the expression x = ++y (if "y" initially = 17)
- The variable "x" will take on the value of 18
- The variable "Y" will become 18
- The variable "x" will take on the value of 17