Programming Flashcards

1
Q

The first declaration in a program: ie. int list [];

A

allocation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The following:

y=10; x=0;
while(!x=y);
x++;

the loop invokes the______

A

empty statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A pretest loop could be formed by the _________ structure

A

for loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

True of False:

Math.random() * 100 could not produce Zero (0)

A

False: it can produce 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what variable name would cause an error in java?

a. modulo
b. all of the given answers
c. public
d. MyProgram
e. theMethod

A

c. Public

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

the fastest, single processor sort available can be shown by the algorithm…

A

nlog(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which of the following would be considered an accumulator?

a. x=x+b
b. x++
c. ++x
d. x=x+5;
e. ,all of the above

A

a. x=x+b;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

if(cx)
x++;

the fragment of code represents ________ logic

A

AND

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

the programs that translate high-level English language programming code to machine level code the computer can use are called….

A

compilers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly