1/19
Function
A mini program within a main program that performs a task
Branching
Takes you from one program area to another
Looping
Repeats a task. Completes after testing is conducted on a variable and returns a value of true or false
Testing
Verifies a condition. Returns a value of true or false
Algorithm
A set of directions used to solve a problem
Defines the teps for performing a task
Keep it as SIMPLE AS POSSIBLE
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
Pseudocode
An english-like language outlining the structure of a program
In object-oriented programming, classes are defined as the structures that hold data and functions.
False
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()
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”>
A C program must contain which of the following?
a main() function
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
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
An algorithm is defined as which of the following?
a set of instructions for solving a specific problem
Which of the following C statements has the highest risk of creating an infinite loop?
for (;;)
A missing parenthesis or brace might cause a C compiler to return which of the following?
syntax error
To add comments to a Perl or Python script, you use which of the following symbols?
#
Most programming languages enable programmers to perform which of the following actions? (Choose all that apply.)
branching, looping, testing
What are the three looping mechanisms in C? (Choose all that apply.)
for, while, do loop
In a Linux script, which of the lines is important because it identifies the file as a script?
#!/bin/sh