already passed
If the computer prints an error message while executing your program, the program contains a(n)
__________.
A- Run-time error
b- Syntax error
c- logic error
d- hidden error - correct answer ✔✔A- run-time error
The kind of language that is easiest for people to use is
a- high-level language
b- assembly language
c- low-level language
d- machine language - correct answer ✔✔A- high-level language
Which of the following is a variable declaration?
A- system.exit(0)
b- "Enter number of apples:"
c- totalFruitCount = appleCount +orangeCount;
d- int appleCount; - correct answer ✔✔d- int appleCount
Which of the following assignments would not be allowed without a typecast?
a- assigning an int value to a float variable
b- assigning a byte value to a double variable
c- assigning a double value to a long variable
d- assigning a short value to a long variable - correct answer ✔✔c- assigning a double value to a long
variable
, Input to a compiler is called
a- a byte-code file
b- source code
c- an executable file
d- object code - correct answer ✔✔b- source code
A(n) __________ occurs when a program has a grammatical mistake like missing punctuation.
a- logic error
b- syntax error
c- run-time error
d- hidden error - correct answer ✔✔b- syntax error
Evaluate (11 +7) % 12 % 5 * 2 - correct answer ✔✔2
11+7= 18
18%12=6
6%5=1
1*2= 2
Evaluate 5 + .0 - 2 - correct answer ✔✔5.0
10/5.0= 2.0
5+2.0= 7.0
7.0-2= 5.0
Evaluate 27 % 5 - correct answer ✔✔2
27%5-> 27/25 = 2
Evaluate 25 - 7 % 12 % 5 * 2 - correct answer ✔✔21
25 - (7%12) %5 *2