Trishul API MCQs with answers Page - 7

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 method executes SQL queries in DB class?

  • (A) executeQuery()
  • (B) prepare()
  • (C) run()
  • (D) queryExec()

A

Admin • 833K Points
Coach

Q. What does PDO::FETCH_ASSOC return?

  • (A) Numeric array
  • (B) Object
  • (C) Associative array
  • (D) Boolean

A

Admin • 833K Points
Coach

Q. Where are dependencies stored in Trishul API?

  • (A) src/
  • (B) vendor/
  • (C) config/
  • (D) lib/

A

Admin • 833K Points
Coach

Q. What is the purpose of .env file?

  • (A) Store routes
  • (B) Store environment variables
  • (C) Store models
  • (D) Store logs

A

Admin • 833K Points
Coach

Q. What is the main benefit of LoggerFactory::get_instance()?

  • (A) Creates DB connection
  • (B) Provides class-specific logger
  • (C) Handles routing
  • (D) Starts server

A

Admin • 833K Points
Coach

Q. Which method is used to update dependencies?

  • (A) composer install
  • (B) composer update
  • (C) composer refresh
  • (D) composer run

A

Admin • 833K Points
Coach

Q. What does set_env_path() do?

  • (A) Sets database path
  • (B) Sets environment file path
  • (C) Sets routing path
  • (D) Sets log path

A

Admin • 833K Points
Coach

Q. Which method modifies request headers in middleware?

  • (A) setHeader()
  • (B) header()->set()
  • (C) addHeader()
  • (D) modifyHeader()

A

Admin • 833K Points
Coach

Q. What type of logging is supported?

  • (A) Console only
  • (B) File-based logging
  • (C) Database logging
  • (D) Remote logging only

A

Admin • 833K Points
Coach

Q. Which component handles HTTP client calls?

  • (A) Request
  • (B) Response
  • (C) TrishulClient
  • (D) Router