Deck 7: Programming for Security Professionals

Full screen (f)
exit full mode
Question
The ____ special character is used with the printf() function in C to indicate a tab.

A)\t
B)\0
C)\n
D)\l
Use Space or
up arrow
down arrow
to flip the card.
Question
You can use /* and */ instead of ____ symbol(s) for one-line comments in C.

A)#
B)#!
C)**
D)//
Question
To compile the "syntax.c" program in *nix you enter the gcc -c syntax.c -o syntax.o command.
Question
Software engineering firms don't retain computer programmers who do not document their work because they know that 80% of the cost of software projects is ____.

A)documentation
B)debugging
C)testing
D)maintenance
Question
UNIX was first written in assembly language, soon rewritten in ____.

A)Smalltalk
B)Perl
C)Python
D)C
Question
The C programming language was developed by ____ at Bell Laboratories in 1972.

A)James Gosling
B)Larry Wall
C)Dennis Ritchie
D)Larry Tesler
Question
Security professionals often need to examine Web pages and recognize when something looks suspicious.
Question
____ is the act of performing a task over and over.

A)Branching
B)Looping
C)Testing
D)Remembering
Question
The ____ special character is used with the printf() function in C to indicate a new line.

A)\t
B)\0
C)\n
D)\l
Question
The logical operator in C that is used to compare the equality of two variables is ____.

A)=
B)&&
C)||
D)==
Question
The mathematical operator in C that increments the unary value by 1 is ____.

A)+
B)%
C)++
D)&
Question
____ takes you from one area of a program (a function) to another area.

A)Branching
B)Looping
C)Testing
D)Dividing
Question
The ____ statement in C is used to load libraries that hold the commands and functions used in your program.

A)#include
B)package
C)use
D)#import
Question
You must always add "//" at the end of comment text in C.
Question
Bugs are worse than syntax errors because a program can run successfully with a bug, but the output might be incorrect or inconsistent.
Question
HTML doesn't use branching, looping, or testing.
Question
The logical operator in C that is evaluated as true if both sides of the operator are true is ____.

A)=
B)&&
C)||
D)==
Question
A ____ is a mini program within a main program that carries out a task.

A)function
B)script
C)branch
D)loop
Question
In C, ____ show where a block of code begins and ends.

A)braces
B)parenthesis
C)brackets
D)dashes
Question
Most programming languages do not have a way to conduct testing of a variable.
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
tells the compiler how to convert a value in a function
Question
In Perl, the keyword "____" is used in front of function names.

A)func
B)declare
C)sub
D)proc
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
represents a numeric or string value
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
converts a text-based program, called source code, into executable or binary code
Question
The HTML ____________________ tag formats text as a level 1 heading.
Question
C programs must contain a(n) ____________________ function, but you can also add your own functions to a C program.
Question
In HTML, each tag has a matching closing tag that's written with a(n) ____ added.

A)forward slash (/)
B)backward slash (\)
C)bang (!)
D)ampersand (&)
Question
The print command for Perl is almost identical to the ____ print command.

A)Java
B)C
C)PHP
D)Smalltalk
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
error that causes unpredictable results
Question
If you want to know what the Perl print command does, you can use ____.

A)perl -h
B)perldoc -f print
C)perl -h print
D)man perl print
Question
A loop usually completes after ____________________ is conducted on a variable and returns a value of true or false.
Question
____ is a markup language rather than a programming language.

A)C
B)HTML
C)Perl
D)PHP
Question
Structures called classes can be written in many ____________________ languages (Java, Object COBOL, or Perl).
Question
In Perl, variables begin with the ____ character.

A)%
B)!
C)*
D)$
Question
Many scripts and programs for security professionals are written in ________________________________________, a powerful scripting language.
Question
In Perl, comment lines begin with the ____ character(s).

A)%
B)//
C)#
D)$
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
GNU C and C++ compilers
Question
____________________ language uses a combination of hexadecimal numbers and expressions, such as mov, add, and sub, making it easier for humans to write programs than in binary or machine language.
Question
In C, the statement ____ tells the compiler to keep doing what's in the brackets over and over and over.

A)loop
B)continue
C)do(forever)
D)for(;;)
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
English-like language you can use to help create the structure of your program
Question
What is an algorithm? You may use an analogy to explain the concept.
Question
How is branching performed in Perl?
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
structure that holds pieces of data and functions
Question
List and describe the variable types used in C.
Question
What is the difference between the = and = = operators in C?
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
checks whether a condition is true and then continues looping until the condition becomes false
Question
How does C's for loop work?
Question
Why is documenting computer programs essential?
Question
The Win32 class contains many functions you can call from your Perl script. How can attackers use these functions? Should security professionals become proficient at using them in a program?
Question
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
performs an action first and then tests to see whether the action should continue to occur
Question
What is a dangerous thing about programming in the C language?
Question
Mention three C compilers and on which operating systems they are available.
Question
In programming, what are variables used for?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/53
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 7: Programming for Security Professionals
1
The ____ special character is used with the printf() function in C to indicate a tab.

A)\t
B)\0
C)\n
D)\l
A
2
You can use /* and */ instead of ____ symbol(s) for one-line comments in C.

A)#
B)#!
C)**
D)//
D
3
To compile the "syntax.c" program in *nix you enter the gcc -c syntax.c -o syntax.o command.
True
4
Software engineering firms don't retain computer programmers who do not document their work because they know that 80% of the cost of software projects is ____.

A)documentation
B)debugging
C)testing
D)maintenance
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
5
UNIX was first written in assembly language, soon rewritten in ____.

A)Smalltalk
B)Perl
C)Python
D)C
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
6
The C programming language was developed by ____ at Bell Laboratories in 1972.

A)James Gosling
B)Larry Wall
C)Dennis Ritchie
D)Larry Tesler
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
7
Security professionals often need to examine Web pages and recognize when something looks suspicious.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
8
____ is the act of performing a task over and over.

A)Branching
B)Looping
C)Testing
D)Remembering
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
9
The ____ special character is used with the printf() function in C to indicate a new line.

A)\t
B)\0
C)\n
D)\l
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
10
The logical operator in C that is used to compare the equality of two variables is ____.

A)=
B)&&
C)||
D)==
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
11
The mathematical operator in C that increments the unary value by 1 is ____.

A)+
B)%
C)++
D)&
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
12
____ takes you from one area of a program (a function) to another area.

A)Branching
B)Looping
C)Testing
D)Dividing
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
13
The ____ statement in C is used to load libraries that hold the commands and functions used in your program.

A)#include
B)package
C)use
D)#import
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
14
You must always add "//" at the end of comment text in C.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
15
Bugs are worse than syntax errors because a program can run successfully with a bug, but the output might be incorrect or inconsistent.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
16
HTML doesn't use branching, looping, or testing.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
17
The logical operator in C that is evaluated as true if both sides of the operator are true is ____.

A)=
B)&&
C)||
D)==
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
18
A ____ is a mini program within a main program that carries out a task.

A)function
B)script
C)branch
D)loop
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
19
In C, ____ show where a block of code begins and ends.

A)braces
B)parenthesis
C)brackets
D)dashes
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
20
Most programming languages do not have a way to conduct testing of a variable.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
21
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
tells the compiler how to convert a value in a function
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
22
In Perl, the keyword "____" is used in front of function names.

A)func
B)declare
C)sub
D)proc
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
23
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
represents a numeric or string value
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
24
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
converts a text-based program, called source code, into executable or binary code
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
25
The HTML ____________________ tag formats text as a level 1 heading.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
26
C programs must contain a(n) ____________________ function, but you can also add your own functions to a C program.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
27
In HTML, each tag has a matching closing tag that's written with a(n) ____ added.

A)forward slash (/)
B)backward slash (\)
C)bang (!)
D)ampersand (&)
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
28
The print command for Perl is almost identical to the ____ print command.

A)Java
B)C
C)PHP
D)Smalltalk
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
29
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
error that causes unpredictable results
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
30
If you want to know what the Perl print command does, you can use ____.

A)perl -h
B)perldoc -f print
C)perl -h print
D)man perl print
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
31
A loop usually completes after ____________________ is conducted on a variable and returns a value of true or false.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
32
____ is a markup language rather than a programming language.

A)C
B)HTML
C)Perl
D)PHP
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
33
Structures called classes can be written in many ____________________ languages (Java, Object COBOL, or Perl).
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
34
In Perl, variables begin with the ____ character.

A)%
B)!
C)*
D)$
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
35
Many scripts and programs for security professionals are written in ________________________________________, a powerful scripting language.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
36
In Perl, comment lines begin with the ____ character(s).

A)%
B)//
C)#
D)$
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
37
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
GNU C and C++ compilers
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
38
____________________ language uses a combination of hexadecimal numbers and expressions, such as mov, add, and sub, making it easier for humans to write programs than in binary or machine language.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
39
In C, the statement ____ tells the compiler to keep doing what's in the brackets over and over and over.

A)loop
B)continue
C)do(forever)
D)for(;;)
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
40
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
English-like language you can use to help create the structure of your program
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
41
What is an algorithm? You may use an analogy to explain the concept.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
42
How is branching performed in Perl?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
43
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
structure that holds pieces of data and functions
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
44
List and describe the variable types used in C.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
45
What is the difference between the = and = = operators in C?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
46
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
checks whether a condition is true and then continues looping until the condition becomes false
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
47
How does C's for loop work?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
48
Why is documenting computer programs essential?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
49
The Win32 class contains many functions you can call from your Perl script. How can attackers use these functions? Should security professionals become proficient at using them in a program?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
50
MATCHING
Match each term with the correct statement below.
a.pseudocode
f.do loop
b.conversion specifier
g.compiler
c.class
h.while loop
d.bug
i.gcc
e.variable
performs an action first and then tests to see whether the action should continue to occur
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
51
What is a dangerous thing about programming in the C language?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
52
Mention three C compilers and on which operating systems they are available.
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
53
In programming, what are variables used for?
Unlock Deck
Unlock for access to all 53 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 53 flashcards in this deck.