Trishul API MCQs with answers Page - 12

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 design pattern is used by DB::get_connection()?

  • (A) Factory
  • (B) Singleton
  • (C) Observer
  • (D) Builder

A

Admin • 833K Points
Coach

Q. What happens if DB configuration is missing?

  • (A) Default values are used
  • (B) Warning is logged
  • (C) Exception is thrown
  • (D) Connection retries

A

Admin • 833K Points
Coach

Q. Which method should be used to obtain DB connection?

  • (A) new DB()
  • (B) connect()
  • (C) get_connection()
  • (D) init()

A

Admin • 833K Points
Coach

Q. What is the return type of get_connection()?

  • (A) MySQL connection
  • (B) PDO object
  • (C) DB instance
  • (D) QueryBuilder

A

Admin • 833K Points
Coach

Q. Which environment variable defines database type?

  • (A) DB_DRIVER
  • (B) DB_ENGINE
  • (C) DB_TYPE
  • (D) DB_KIND

A

Admin • 833K Points
Coach

Q. Which database types are supported?

  • (A) MySQL, MongoDB, Redis
  • (B) MySQL, PostgreSQL, Oracle
  • (C) SQLite only
  • (D) Oracle only

A

Admin • 833K Points
Coach

Q. What happens if unsupported DB type is provided?

  • (A) Defaults to MySQL
  • (B) Silent failure
  • (C) Exception is thrown
  • (D) Fallback to SQLite

A

Admin • 833K Points
Coach

Q. Which variable defines database host?

  • (A) DB_SERVER
  • (B) DB_HOST
  • (C) DB_URL
  • (D) DB_ADDR

A

Admin • 833K Points
Coach

Q. Which variable defines database name?

  • (A) DB_DATABASE
  • (B) DB_NAME
  • (C) DB_SCHEMA
  • (D) DB_TABLE

A

Admin • 833K Points
Coach

Q. Which variable defines database port?

  • (A) DB_PORT
  • (B) DB_CONN_PORT
  • (C) DB_SOCKET
  • (D) DB_CHANNEL

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