Question Bank

3705 approved questions from the community

PHP constants should ideally be defined at the beginning of a script to ensure consistent values.

EASY
TRUE FALSE
20s
PHP
by Mohamed

The E_RECOVERABLE_ERROR type indicates major issues that still allow script execution to continue.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

PHP scripts execute from bottom to top unless there's a redirect, error, or exit.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

A constant's value can be changed after it has been defined in PHP.

EASY
TRUE FALSE
20s
PHP
by Mohamed

Constants in PHP have global scope and can be accessed from any part of the code.

MEDIUM
TRUE FALSE
25s
PHP
by Mohamed

What is the purpose of the `req.originalUrl` property?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

What HTTP status code should be returned when a resource is successfully created?

EASY
SINGLE CHOICE
25s
Express
by Mohamed

How do you implement WebSocket support in an Express.js application?

HARD
SINGLE CHOICE
45s
Express
by Mohamed

The `res.location()` method sets the Location header but does not send a response.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

Express.js applications can be tested using frameworks like Jest or Mocha.

EASY
TRUE FALSE
20s
Express
by Mohamed

Express.js can handle Server-Sent Events (SSE) for real-time updates without additional libraries.

HARD
TRUE FALSE
30s
Express
by Mohamed

The `req.secure` property indicates whether the request was made over HTTPS.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

How do you set custom HTTP response headers in Express.js?

MEDIUM
SINGLE CHOICE
30s
Express
by Mohamed

What is the purpose of the `req.baseUrl` property?

MEDIUM
SINGLE CHOICE
35s
Express
by Mohamed

Which method is used to specify a view engine in Express.js?

EASY
SINGLE CHOICE
25s
Express
by Mohamed

Express.js middleware can modify the `req` object to pass data between middlewares in the chain.

HARD
TRUE FALSE
30s
Express
by Mohamed

The `res.attachment()` method sets the Content-Disposition header to trigger file downloads.

MEDIUM
TRUE FALSE
25s
Express
by Mohamed

Express.js is the only web framework available for Node.js.

EASY
TRUE FALSE
20s
Express
by Mohamed

What does the morgan middleware do in Express.js?

MEDIUM
SINGLE CHOICE
30s
Express
by Mohamed

What is the difference between res.redirect(301) and res.redirect(302)?

HARD
SINGLE CHOICE
40s
Express
by Mohamed
PreviousPage 58 of 186Next