CIS 110 Final Questions – Flashcards
165 test answers
Unlock all answers in this set
Unlock answers 165question
What is the code below that will configure a background image called parchment.gif for a web page using CSS?
answer
body {background-image:url(parchment.gif); }
Unlock the answer
question
what is the code below that uses CSS to eliminate the default border on an image configured as an image?
answer
img {border: 0; }
Unlock the answer
question
The theorem that states that any program logic can be written using only three constructs is called the ________________theorem
answer
Structure
Unlock the answer
question
Counted repetition refers to the idea that an index is _________ and then tested each time the loop iterates.
answer
incremented
Unlock the answer
question
What controls a for loop?
answer
iteration variable
Unlock the answer
question
How many iterations will occur in this loop? for (again = 1; again ;=5; again = again + 1) {...}
answer
5
Unlock the answer
question
what code iterates 10 times?
answer
) for (i = 1; i ;=10; i = i + 1)
Unlock the answer
question
What is an example of an infinite loop?
answer
for (i = 1; i ;= 4; i = i - 1)
Unlock the answer
question
What does + mean in javascript?
answer
addition or concentration
Unlock the answer
question
in the line: var rows = new Array(5); what will result?
answer
the first item in the array will be rows[0]
Unlock the answer
question
what is clearTimeout used for?
answer
Cancelling a timer
Unlock the answer
question
For the elements of the array to store an image, they must be initialized to a(n):
answer
image object
Unlock the answer
question
In a for loop, the operation that sets the variable's value for the first iteration of the loop is the:
answer
initialization
Unlock the answer
question
What is an indexed base name?
answer
array
Unlock the answer
question
What is the standard form of the World-Famous Iteration? (WFI)
answer
) for ( j=0; j<n; j++) { . . . }
Unlock the answer
question
Which is the first step in the program development cycle?
answer
Analyze the problem
Unlock the answer
question
What is not a control structure?
answer
syntax
Unlock the answer
question
What is not one of the primary Javascript data types?
answer
float
Unlock the answer
question
What data type can only have one of two possible values?
answer
Boolean
Unlock the answer
question
What is not an acceptable variable name?
answer
1_Name
Unlock the answer
question
What is not an acceptable variable name for a friend?
answer
my friend
Unlock the answer
question
If the variable hours = 10, what is the value of the variable salary after the following instruction has been executed: salary = hours * 8
answer
80
Unlock the answer
question
which method allows you to display text on an html page?
answer
write()
Unlock the answer
question
Which method will retrieve the contents of an html element?
answer
getElementByld()
Unlock the answer
question
Evaluate 8 % 7
answer
1
Unlock the answer
question
Given: a = 4 and b = 3, evaluate: (14 % a ) * a * b / 6 + (b * b)
answer
13
Unlock the answer
question
If car = "Honda", how does the following expression evaluate: (car < "Toyota");
answer
true value
Unlock the answer
question
If beverage = "tea", which of the following is true?
answer
!(beverage != "tea");
Unlock the answer
question
Which is equivalent to (X > 5) given that X is a numeric variable.
answer
!(X <= 5)
Unlock the answer
question
Which of the following will assign the variable named timCall to the sentence: Tim called, "Lassie, come home!"
answer
var timCall = 'Tim called, "Lassie, come home!"';
Unlock the answer
question
Which of the following is NOT a valid variable name for a dog?
answer
dogs-rule
Unlock the answer
question
Given the following code snippet, what will be displayed on the web page if the user enters 4 at the prompt? var myNum = prompt("Enter a number:"); var result = myNum + myNum; document.write(result);
answer
44
Unlock the answer
question
Given the following code snippet, what will be displayed on the web page if the user enters 4 at the prompt? var myNum = prompt("Enter a number:"); var result = myNum * myNum; document.write(result);
answer
16
Unlock the answer
question
Given the following code snippet, what will be displayed on the web page? var X = 23; var Y = 3; var Z = X + Y; document.write(Z);
answer
26
Unlock the answer
question
Given the following code snippet, what will be displayed on the web page if the user enters 6.35 at the prompt? var A = prompt("Enter a number:"); document.write(parseFloat(A) + ", "); document.write(parseInt(A)); a. 6.35NaN b. 6.35 c. 6.35, 6 d. 6.35, 6.35
answer
6.35, 6
Unlock the answer
question
Given the following code snippet, what will be displayed on the web page if the user enters 55 at the prompt? var result = "Yes!"; var multiply = prompt("What is 5 * 11?"); result = (parseInt(multiply) == 55)?"Correct":"Incorrect"; document.write(result);
answer
correct
Unlock the answer
question
What type of loop executes at least once?
answer
post-test
Unlock the answer
question
what is the value of x after the following statement executes, given that initially x = 8: x*=3;
answer
24
Unlock the answer
question
How many times will "bye bye" display after the following code is executed? var b = 3; var g = 1; do { document.write("bye bye"); g++; } while (g > b)
answer
1
Unlock the answer
question
What is the result of the following code snippet? var car = 4; var result = isNaN(car); document.write(result);
answer
True
Unlock the answer
question
What is the value of the variable myLetter after the following statements are executed? var name = "Santa Claus"; var myLetter = name.charAt(3);
answer
"t"
Unlock the answer
question
What function will generate a random number between 1 and 100, inclusive
answer
. num = (Math.floor(Math.random() * 100) + 1;
Unlock the answer
question
Which of the following will display "cost is $23.95", assuming cost = 23.9487 ?
answer
document.write("cost is " + cost.toFixed(2);
Unlock the answer
question
In the following statement, what is the initial condition, given that y = 600? for(x = 500; x > y; x++)
answer
x = 500
Unlock the answer
question
What is the value of count when the following loop is exited? var count = 20; while( count < 200) count*=3;
answer
540
Unlock the answer
question
What will be displayed after the following loop is exited? var name = "Liam"; for(var x = 3; x < 0; x--) document.write(name.charAt(x) + ", ");
answer
m a I L
Unlock the answer
question
What is the value of address, given: myAddress = "123 Duck Street, NW"; address = myAddress.length;
answer
19
Unlock the answer
question
What is the value of street given: var street = " "; myAddress = "123 Duck Street, NW"; for( var x = 4; x <= 7; x++) street = street + myAddress.charAt(x);
answer
Duck
Unlock the answer
question
From language to language, generally an identifier:
answer
starts with a letter and is followed by letters, numerals, or the underscore
Unlock the answer
question
Which of the following is a valid JavaScript variable name?
answer
BR549
Unlock the answer
question
In JavaScript, the escape symbol is the:
answer
backslash ()
Unlock the answer
question
Which of the following is not a suitable assignment statement?
answer
length * width = area
Unlock the answer
question
The value used for a variable on the right side of an assignment statement is:
answer
the value before the statement is executed
Unlock the answer
question
The first step in solving a programming expression is to process:
answer
the part of the expression inside the parentheses
Unlock the answer
question
In JavaScript, 17%5 is:
answer
2
Unlock the answer
question
An if statement must have:
answer
a semicolon at the end of it
Unlock the answer
question
How is an empty string written?
answer
""
Unlock the answer
question
string constants/literals are:
answer
surrounded by quotes in Javascript code
Unlock the answer
question
Javascript is:
answer
an interpreted language, meaning that the program code is executed directly without compiling
Unlock the answer
question
what side programs do not require users to wait for data to be sent over the Internet to a Web server?
answer
client
Unlock the answer
question
What code can be inserted directly into an HTML file or placed in a separate text file that is linked to a Web page?
answer
Javascript
Unlock the answer
question
Placing JavaScript code in a Web page file means that users need to retrieve only ____ file from the server.
answer
1
Unlock the answer
question
What is the type of attribute value for Javascript?
answer
text/javascript
Unlock the answer
question
there is no limit to the number what elements used within a web page?
answer
script
Unlock the answer
question
what section of a web page can scripts be placed?
answer
head and body
Unlock the answer
question
JavaScript supports comment tags, using a set of double ____ at the beginning of a line that instructs the browser to ignore the line and not interpret it as a JavaScript command.
answer
slashes
Unlock the answer
question
One way to handle the way that XML parsers treat the content of a JavaScript program is to place the JavaScript code within a(n) ____ section.
answer
CDATA
Unlock the answer
question
The text string specified by the document.write() method can be enclosed within what?
answer
double quotation marks or single quotation marks
Unlock the answer
question
Each JavaScript command line ends with a(n) ____ to separate it from the next command line in the program.
answer
semicolon
Unlock the answer
question
An action for the browser to take in a script is called what?
answer
a command and a statement
Unlock the answer
question
You can display single quotation marks with the document.write() method by enclosing your text string within what?
answer
double quotation marks
Unlock the answer
question
Another method to write text to the Web page is the what method?
answer
document.writeIn()
Unlock the answer
question
Why must you pay attention to whether or not letters are capitalized in javascript?
answer
javascript is case sensitive
Unlock the answer
question
what does javascript do with most occurrences of white space?
answer
ignores it
Unlock the answer
question
you can indicate that a statement continues on the next line using what?
answer
backslash
Unlock the answer
question
what are useful because they can store information created in one part of your program and use that information in another?
answer
variables
Unlock the answer
question
naming a variable, the first character must be either a letter or what?
answer
underscore
Unlock the answer
question
variable names cannot contain what?
answer
spaces
Unlock the answer
question
variable declarations should be placed at what part of a program to make interpretation easier?
answer
beginning
Unlock the answer
question
what is any group of characters such as "hello" or "happy holidays!"?
answer
text string
Unlock the answer
question
Variable names declared in a function can be used when? 19
answer
only inside that function
Unlock the answer
question
what is not a part of a function?
answer
global variables
Unlock the answer
question
output directly onto a web page from javascript is done using what?
answer
document.write()
Unlock the answer
question
a variable declared in a function is what?
answer
local variable
Unlock the answer
question
in javascript the result of a function call can be printed on the monitor how?
answer
with the alert( ) call interactively after the page is displayed while building the page on the fly
Unlock the answer
question
a function that cannot be reused:
answer
cannot be used as a building block
Unlock the answer
question
javascript function that retrieves the current date and time in numeric form is what?
answer
date()
Unlock the answer
question
the function toString():
answer
converts a numeric form to a printable form
Unlock the answer
question
what is another word for function?
answer
procedure, subroutine, method
Unlock the answer
question
how would you find the time between two dates?
answer
divide the difference by 1000 to find the seconds
Unlock the answer
question
which function loads the page that is specified as its first arguement?
answer
window.open()
Unlock the answer
question
what are inputs also called?
answer
parameters
Unlock the answer
question
the random numbers generated by math.random():
answer
are really pseudo-random
Unlock the answer
question
the values returned by the Math.random() function are between
answer
0 (inclusive) and 1 (exclusive)
Unlock the answer
question
before you use a variable in javascript you should what?
answer
declare it
Unlock the answer
question
what is an exemple of a non numeric value data type?
answer
"12"
Unlock the answer
question
how many data types does javascript support?
answer
4
Unlock the answer
question
you can cause a variable to have no value by assigning it what value?
answer
Null
Unlock the answer
question
what symbol can be used to combine text strings?
answer
+
Unlock the answer
question
what language forces programming to explicitly identify a variable's data type?
answer
strongly typed
Unlock the answer
question
when used with both numbers and text, what symbol treats the numbers as text?
answer
c. +
Unlock the answer
question
when variables are not strictly tied to specific data types, programmers refer to the language as_____ typed language
answer
loosely
Unlock the answer
question
if you follow z+1 with the statement z="3", then z has what data type?
answer
text string
Unlock the answer
question
If x has the value 5 and the variable y has the value "combo", then y + " no " + x results in what value?
answer
combo no 5
Unlock the answer
question
a function includes what function which identifies it?
answer
name
Unlock the answer
question
a function may require what values used by the function?
answer
parameters
Unlock the answer
question
what commands can be used in a function?
answer
return 3; z=1+2; document.write("Hello World");
Unlock the answer
question
What does the JavaScript command document.println("Hello" + "World"); print? 19
answer
HelloWorld
Unlock the answer
question
what is X in xml?
answer
extensible
Unlock the answer
question
what are the similarities between xml and html
answer
are markup languages derive from sgml use tags
Unlock the answer
question
what is mandatory in xml?
answer
document root element
Unlock the answer
question
where is other optional info placed?
answer
in the prolog
Unlock the answer
question
if you use and xml declaration at the top of an xml doc then
answer
it must be the 1st thing
Unlock the answer
question
the doc type definition is a statement of what?
answer
the permitted structure of the xml
Unlock the answer
question
what can you do if you know the structure and properties of data?
answer
retrieve it organize it manage it
Unlock the answer
question
in database terminology, a set of entity instances refers to what?
answer
table
Unlock the answer
question
the kind of info stored in a field in a database is what?
answer
data type
Unlock the answer
question
a project operation does what?
answer
a)return a table with as many rows as the original tables b)return only unique rows and merge duplicate rows c)automatically sort the list in alphabetical order by the first field
Unlock the answer
question
databases store data just once why?
answer
to avoid redundancy
Unlock the answer
question
how do you identify the type of data in xml?
answer
by its tag
Unlock the answer
question
what tag encloses everything in an xml?
answer
the root element
Unlock the answer
question
when is indenting required in xml?
answer
never
Unlock the answer
question
a database row is what?
answer
tuple or record
Unlock the answer
question
database rows are what?
answer
unordered
Unlock the answer
question
what is the main use of a database?
answer
find info
Unlock the answer
question
when using a select operation the test is applied to what?
answer
each row
Unlock the answer
question
the tag is what?
answer
a collection tag
Unlock the answer
question
the tag is what?
answer
an identification tag
Unlock the answer
question
what is the root tag?
answer
collection tag
Unlock the answer
question
what styles xml files for a browser?
answer
xsl
Unlock the answer
question
an incremental approach to development has the advantage of what?
answer
shortening development time making the final product smaller limiting errors to recently developed materials
Unlock the answer
question
when you open an xml file without a stylesheet what happens?
answer
it displays a tree showing the structure of your file
Unlock the answer
question
what are xsl tag rules called?
answer
templates
Unlock the answer
question
the second line of an xml file that uses an xsl template begins with what?
answer
;?xsl-stylesheet
Unlock the answer
question
iDiary is ordered by what?
answer
date
Unlock the answer
question
each attribute in an xsl file requires what?
answer
tag
Unlock the answer
question
to add entries to idiary you would do what?
answer
modify the xml file
Unlock the answer
question
xml and xsl files are combined in what to convert them to html?
answer
transformer
Unlock the answer
question
Virus protection software:
answer
should be installed on your computer immediately must be updated to keep it current must be operating at all times to protect against worms and viruses
Unlock the answer
question
European privacy standards are closest to the policy called what?
answer
no uses
Unlock the answer
question
American privacy standards are closest to what?
answer
no limits
Unlock the answer
question
The accuracy of personal info is who's responsibility?
answer
individual
Unlock the answer
question
Who is in charge of privacy policies and communication with individuals regarding their privacy?
answer
data controller
Unlock the answer
question
personal info can be tracked by what?
answer
cell phone use, cookies, ip address
Unlock the answer
question
if you disable cookies on your computer what happens?
answer
all cookies, including third-party cookies, will be blocked normal Web interaction will be more difficult you won't be able to do online transactions
Unlock the answer
question
Spyware is what?
answer
software that snoops private info
Unlock the answer
question
The RSA public key cryptosystem relies on what?
answer
prime numbers
Unlock the answer
question
where are cookies stored?
answer
on a client and retrieved by a server
Unlock the answer
question
Backups on you personal computer:
answer
are just as essential to a personal system as a business system
Unlock the answer
question
personal backups are not critical for what?
answer
information that has been backed up but not changed software programs unimportant files
Unlock the answer
question
The most important consideration in a disaster recovery plan is what?
answer
to have a backup of your data
Unlock the answer
question
What puts you at greater risk of being hacked?
answer
using a Web site that doesn't use encryption using email to respond to requests for personal information clicking on a URL instead of typing it in all of the above
Unlock the answer
question
when were OCED privacy principles developed?
answer
1980
Unlock the answer
question
Which OCED principle states that personal data should be protected by reasonable security measures against risks of disclosure, unauthorized access, misuse, modification, destruction, or loss?
answer
security Principal
Unlock the answer
question
Which privacy law was passed in 1996?
answer
Health Insurance Privacy and Accountability Act
Unlock the answer
question
A cookie contains info stored in how many fields?
answer
seven fields
Unlock the answer
question
The crime of posing as someone else for fraudulent purposes is known as what?
answer
identity theft
Unlock the answer
question
A combo of encryption and decryption methods is what?
answer
crytosystem
Unlock the answer
question
what is the mode in which a virus worm or other malware gets into your computer?
answer
vector of attack
Unlock the answer
question
What may result from malware?
answer
spam sent from your computer secure information obtained from your computer contents erased on the hard drive
Unlock the answer
question
When the send button is clicked what happens?
answer
two copies of the message are produced
Unlock the answer