Trishul API MCQs with answers Page - 13

Here, you will find a collection of MCQ questions on Trishul API . Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 833K Points
Coach

Q. Which variable defines database username?

  • (A) DB_USER
  • (B) DB_USERNAME
  • (C) DB_LOGIN
  • (D) DB_ACCOUNT

A

Admin • 833K Points
Coach

Q. Which variable defines database password?

  • (A) DB_PASS
  • (B) DB_PASSWORD
  • (C) DB_SECRET
  • (D) DB_KEY

A

Admin • 833K Points
Coach

Q. Which class is used internally to read environment variables?

  • (A) EnvReader
  • (B) Environment
  • (C) ConfigLoader
  • (D) EnvManager

A

Admin • 833K Points
Coach

Q. Which class stores DB configuration?

  • (A) DBConfig
  • (B) DbConfig
  • (C) ConfigDB
  • (D) DatabaseConfig

A

Admin • 833K Points
Coach

Q. What is PDO error mode set to?

  • (A) ERRMODE_SILENT
  • (B) ERRMODE_WARNING
  • (C) ERRMODE_EXCEPTION
  • (D) ERRMODE_LOG

A

Admin • 833K Points
Coach

Q. Why is ERRMODE_EXCEPTION important?

  • (A) Improves UI
  • (B) Handles DB errors robustly
  • (C) Increases speed
  • (D) Reduces memory

A

Admin • 833K Points
Coach

Q. What happens on subsequent calls to get_connection()?

  • (A) New connection created
  • (B) Same PDO instance returned
  • (C) Connection closed
  • (D) Error thrown

A

Admin • 833K Points
Coach

Q. What is recommended usage of DB class?

  • (A) Instantiate directly
  • (B) Use static get_connection()
  • (C) Use global variable
  • (D) Use dependency injection

A

Admin • 833K Points
Coach

Q. Which exception scenario is handled by DB class?

  • (A) Routing errors
  • (B) Missing configuration or connection failure
  • (C) UI errors
  • (D) Middleware errors

A

Admin • 833K Points
Coach

Q. What is MiddlewareInterface used for?

  • (A) Database operations
  • (B) Intercepting HTTP requests and responses
  • (C) Routing requests
  • (D) Generating UI

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ