Computer Ch 1 Test: Comprehension Check
You create line comments in PHP code by adding the _________ to a line you want to use as a comment.
# or //
Which of the following refers to the first element in an indexed array named $Employees[ ]? - $Employees[0] - $Employees[1] - $Employees[first] - $Employees[a]
$Employees[0]
Which is the correct syntax for declaring a variable and assigning it to a string? - $MyVariable = "Hello"; - $MyVariable = "Hello" - "Hello" = $MyVariable; - $MyVariable = Hello;
$MyVariable = "Hello";
Which of the following is a valid variable name? - SalesOrder - salesOrder - $SalesOrder - $1SalesOrder
$SalesOrder
Block comments begin with /* and end with ________
*/
What is the default extension that most Web servers use to process PHP scripts?
.php
What is the value of the expression 4 * (2+3)?
20
Explain the concept of data types.
A data type is the specific category of information that a variable contains.
Which of the following values can be assigned to a Boolean variable? (Choose all that apply.) - TRUE - FALSE - 1 - YES
Don't worry about this.
What value is assigned to the $ReturnValue variable in the statement $ReturnValue = !$x; assuming that $x has a value of TRUE?
False
You are not required to initialize a variable when you first declare it in PHP. True or False?
False
What do use to separate multiple arguments that are passed to a function?
a comma (,)
The modulus operator (%) _________. - converts an operand to base 16 (hexadecimal) format - returns the absolute value of an operand - calculates the percentage of one operand compared to another - divides two operands and returns the remainder
divides two operates and returns the remainder
A loosely typed programming language ________. - does not require data types of variables to be declared - requires data types of variables to be declared - does not have different data types - does not have variables
does not require data types to be declared
The order of priority in which operations in an expression are evaluated is known as _______________.
operator precedence
The logical And (&&) operator returns TRUE if _______________.
the left and right operands both return a value of True
How many decimal places does an integer store?
zero