b. Triggering Event
2. The type of a variable that is volatile is
a. Volatile variable
b. Mutable variable
c. Immutable variable
d. Dynamic variable
Explanation : The variables whose values can be changed are called mutable variable types.
3. A hexadecimal literal begins with
d. Both b and c
Explanation : Generally, X or x denotes hexadecimal values. So, any integer literal that begins with 0X or 0x denotes a hexadecimal number.
4. The generalised syntax for a real number representation is
a. [digits][.digits][(E|e)[(+|-)]digits] b. [digits][+digits][(E|e)[(+|-)]digits] c. [digits][(E|e)[(+|-)]digits] d. [.digits][digits][(E|e)[(+|-)]digits] View Answer
Explanation : Floating-point literals may also be represented using exponential notation: a real number followed by the letter e (or E), followed by an optional plus or minus sign, followed by an integer exponent. This notation represents the real number multiplied by 10 to the power of the exponent.
a. Prints an exception error
b. Prints an overflow error
c. Displays “Infinity”
d. Prints the value as such
a. Syntax error
b. Missing of semicolons
c. Division by zero
d. All of the above
7. The escape sequence ‘\f’ stands for
a. Floating numbers
b. Representation of functions that returns a value
d. Form feed
8. The snippet that has to be used to check if “a” is not equal to “null” is
b. if (!a)
Explanation : The not-equal operator !== compares o to null and evaluates to either true or false.
9. The statement a===b refers to
a. Both a and b are equal in value, type and reference address
b. Both a and b are equal in value
c. Both a and b are equal in value and type
d. There is no such statement
Explanation : a==b returns a true if a and b refer to the same objec ,so they are equal, else it returns a false.
10. Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator)
c. String newvariable=”false”
d. Both a and b
Explanation : A non-string can be converted in two ways without using a new operator. false.toString() and String(false).