Ethical Hacking Module 7: Programming for Security Professionals

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/19

flashcard set

Earn XP

Description and Tags

finally we're getting into coding

20 Terms

1
New cards

Function

A mini program within a main program that performs a task

2
New cards

Branching

Takes you from one program area to another

3
New cards

Looping

Repeats a task. Completes after testing is conducted on a variable and returns a value of true or false

4
New cards

Testing

Verifies a condition. Returns a value of true or false

5
New cards

Algorithm

A set of directions used to solve a problem

  • Defines the teps for performing a task

  • Keep it as SIMPLE AS POSSIBLE


6
New cards

Bug

A programming error that causes unpredictable results in a program

  • Worse than syntax errors because a program can run successfully with it, but the output might be incorrect or inconsistent


7
New cards

Pseudocode

An english-like language outlining the structure of a program

8
New cards

In object-oriented programming, classes are defined as the structures that hold data and functions.

False

9
New cards

Which of the following is the Win32 API function for verifying the file system on a Windows computer? (It’s not GetVolumeInformation(), they did something different for this class)

FsType()

10
New cards

Which of the following HTML tags is used to create a hyperlink to a remote website? (spacing is weird to prevent links from being formed)

<a href = “http : // URL”>

11
New cards

A C program must contain which of the following?

a main() function

12
New cards

What is the result of 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!" is displayed

13
New cards

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

14
New cards

An algorithm is defined as which of the following?

a set of instructions for solving a specific problem

15
New cards

Which of the following C statements has the highest risk of creating an infinite loop?

for (;;)

16
New cards

A missing parenthesis or brace might cause a C compiler to return which of the following?

syntax error

17
New cards

To add comments to a Perl or Python script, you use which of the following symbols?

#

18
New cards

Most programming languages enable programmers to perform which of the following actions? (Choose all that apply.)

branching, looping, testing

19
New cards

What are the three looping mechanisms in C? (Choose all that apply.)

for, while, do loop

20
New cards

In a Linux script, which of the lines is important because it identifies the file as a script?

#!/bin/sh