0

programming languages Online Quiz - 351

Description: programming languages Online Quiz - 351
Number of Questions: 21
Created by:
Tags: programming languages
Attempted 0/21 Correct 0 Score 0
  1. response.write("Hello World")

  2. document.write("Hello World")

  3. ("Hello World")

  4. "Hello World"


Correct Option: B
Explanation:

To write "Hello World" in JavaScript, the correct syntax is:

B. document.write("Hello World")

Explanation:

A. response.write("Hello World"): This is not the correct syntax. The "response" object does not have a "write" method in JavaScript.

B. document.write("Hello World"): This is the correct syntax. The "document" object represents the current web page, and the "write" method is used to write content directly to the web page. In this case, it will write "Hello World" to the page.

C. ("Hello World"): This is not the correct syntax. Parentheses alone do not have any specific meaning in JavaScript.

D. "Hello World": This is a string literal and is valid syntax in JavaScript. However, it does not actually write "Hello World" to the web page. It is just a static string value that can be assigned to a variable or used in other operations.

Therefore, the correct answer is B. document.write("Hello World").

  1. for (i = 0; i <= 5; i++)

  2. for i = 1 to 5

  3. for (i <= 5; i++)

  4. for (i = 0; i <= 5)


Correct Option: A
  1. SELECT * FROM Contest WHERE ContestDate < '05/25/2006'

  2. SELECT * FROM Contest HAVING ContestDate >= '05/25/2006'

  3. SELECT * FROM Contest WHERE ContestDate >= '05/25/2006'

  4. None of the above


Correct Option: C
  1. To retrieve data.

  2. To insert data.

  3. To modify data.

  4. All the above


Correct Option: B
  1. checks if the table has primary key specified

  2. deletes the table

  3. deletes all rows from a table

  4. None of the above


Correct Option: C

A single source file can contain multiple class definitions, each having any access modifier.

  1. True

  2. False


Correct Option: B

Class variables can be accessed only with the class name.

  1. True

  2. False


Correct Option: B

A thread is a process

  1. True

  2. False


Correct Option: B

System class provides facilities to load files and libraries, and to create them.

  1. True

  2. False


Correct Option: B

When a method is overridden, the overriding method can throw only the same exceptions as the overridden method, a subset of them or subclasses of the exceptions.

  1. True

  2. False


Correct Option: A

All non-assignment operators are evaluated from left to right.

  1. True

  2. False


Correct Option: A

What are various privileges that a user can grant to another user?

  1. SELECT, CONNECT, RESOURCE

  2. SELECT,INSERT,DELETE

  3. INSERT,DELETE,MODIFY,

  4. None Of The Above


Correct Option: A

Can a primary key contain more than one columns?

  1. True

  2. False


Correct Option: A
  1. DISTINCT

  2. UNIQUE

  3. DISTINCT and UNIQUE

  4. None Of The Above


Correct Option: A
- Hide questions