Module 7 Quiz Flashcards
Using the following Perl code, how many times will "This is easy..." be displayed onscreen? for ($count=1; $count <= 5; $count++) { print "This is easy…"; }
5, none, 6, or 4?
5
Which of the following tags enables an HTML programmer to create a loop?
HTML doesn’t have a looping function or tag.
Perl and C are the most widely used programming languages among security professionals. True or False?
True
A missing parenthesis or brace might cause a C compiler to return which of the following?
Syntax error
Which of the following is the Win32 API function for verifying the file system on a Windows computer?
FsType()
Which of the following C statements has the highest risk of creating an infinite loop?
for (;;)
Which of the following HTML tags is used to create a hyperlink to a remote Web site?
<a></a>
HTML files must be compiled before users can see the resulting Web pages. True or False?
False
A C program must contain which of the following?
A main() function
To add comments to a Perl script, you use which of the following symbols?
#
An algorithm is defined as which of the following?
A set of instructions for solving a specific problem
Before writing a program, many programmers outline it first by using which of the following?
Pseudocode
In object-oriented programming, classes are defined as the structures that hold data and functions. True or False?
True
What is the result of running the following C program? main() { int a = 2; if (a = 1) printf("I made a mistake!"); else printf("I did it correctly!"); }
“I made a mistake!”
In C, which looping function performs an action first and then tests to see whether the action should continue to occur?
do loop
Which of the following is the act of performing a task over and over?
Looping
Which of the following statements in the C programming language is used to load libraries that hold the commands and functions used in your program?
include
The print command for Perl is almost identical to the print command used in which of the following programming languages?
C
Security professionals often need to examine Web pages and recognize when something looks suspicious. True or False
True
Carelessly reviewing your program’s code might result in having which of the following in your program code?
Bug
In the C programming language, which variable type holds the value of a single letter?
Char
Which of the following special characters is used with the printf() function in the C programming language to indicate a new line?
\n
In HTML, each tag has a matching closing tag that is written with which of the following characters?
Forward slash /
You must always add “//” at the end of comment text when using C language. True or False
False
Which of the following logical operators in the C programming language is evaluated as true if both sides of the operator are true?
&&
Which of the following mathematical operators in the C programming language increments the unary value by 1?
++
In a Perl program, to go from one function to another, you simply call the function by entering which of the following in your source code?
name
UNIX was first written in assembly language. However, it was soon rewritten in what programming language?
C
In the C programming language, which of the following show where a block of code begins and ends?
Braces {
In the C programming language, which statement tells the compiler to keep doing what is in the brackets over and over and over?
for(;;)
If you want to know what the Perl print command does, you can use which of the following commands?
perldoc -f print
In object-oriented programming, a function contained in a class is called which of the following?
member function
Which of the following takes you from one area of a program (a function) to another area?
Branching
Which of the following is a markup language rather than a programming language?
HTML
Which of the following logical operators in the C programming language is used to compare the equality of two variables?
==
You can use the syntax /* and */ to accomplish what function when working with large portions of text?
comment
Which of the following is a backdoor initiated from inside the target’s network that makes it possible to take control of the target even when it’s behind a firewall?
reverse shell
In the Perl programming language, which of the following keywords is used in front of function names?
sub
Which of the following is a mini-program within a main program that carries out a task?
function
Bugs are worse than syntax errors because a program can run successfully with a bug, but the output might be incorrect or inconsistent. True or False
True
Most programming languages have a way to branch, loop, and test.
True
In object-oriented programming, which of the following are structures that hold pieces of data and functions?
classes
In the Perl programming language, variables begin with which of the following characters?
$
In the Perl programming language, comment lines begin with the which of the following character(s)?
#
When a compiler finds errors, it usually indicates what they are so you can correct the code and compile the program again. True or False
True