Practice Free AD0-P101 Exam Online Questions
What are advantages of using interfaces in ColdFusion components? (Choose 2)
- A . Allows multiple inheritance
- B . Defines a contract for implementing components
- C . Forces implementation of specified methods
- D . Supports dynamic method overriding
How can a method in a ColdFusion component (CFC) be marked as a constructor?
- A . Use the <cfinit> tag.
- B . Create a method named init.
- C . Use <cfconstructor> in the component
- D . Use <cfcreate> to initialize it.
What tag is used to handle exceptions in ColdFusion?
- A . <cfexception>
- B . <cfcatch>
- C . <cferror>
- D . <cftry>
Which attributes are required for the <cfdocument> tag to generate a PDF? (Choose 3)
- A . format
- B . name
- C . title
- D . filename
- E . orientation
A developer wants to store a variable for only the duration of a single HTTP request.
Which scope should they use?
- A . session
- B . application
- C . request
- D . variables
What is the correct syntax for using the null coalescing operator in ColdFusion?
- A . a ?? b
- B . a ? b : c
- C . a ?: b
- D . a or b
What is the correct tag syntax to define a ColdFusion function?
- A . <cffunction name="myFunction" returntype="string">
- B . <cfmethod name="myFunction" returntype="string">
- C . <cfscript name="myFunction" returntype="string">
- D . <cfaction name="myFunction" returntype="string">
A developer is storing user preferences using the session scope but notices data inconsistencies.
What should they do to resolve this?
- A . Use <cfif> to check for null values.
- B . Use <cflock> to synchronize variable access.
- C . Declare variables in the variables scope instead.
- D . Migrate to the application scope.
Which attribute in <cfdocument> allows embedding of fonts in the output PDF?
- A . embed="true"
- B . fontembed="true"
- C . font="embedded"
- D . embedfonts="true"
What are appropriate use cases for the session scope? (Choose 2)
- A . Storing user preferences
- B . Sharing configuration settings across users
- C . Storing user authentication tokens
- D . Sharing temporary variables across server instances
