Top Adobe ColdFusion Multiple Choice Questions
1. I need to make multiple, related changes to a database, but all those changes must be made w/o errors before I actually commit them. Which tag should I use?
A. cftry and cfcatch
B. cfrollback
C. cftransaction
D. cfupdate
Ans:C
2. Which of the following always returns TRUE?
A. IsDefined(“CGI.cgivariable”)
B. IsDefined(“REQUEST.requestvariable”)
C. IsDefined(“FORM.formfield”)
D. IsDefined(“URL.urlvariable”)
Ans:A
4. What happens to your session when the CF Server is restarted?
A. You lose the session
B. Your session remains the same
C. Your session can be activated back if you have the CFID and CFToken
Ans:A
5. Can you nest one ColdFusion comment inside of another ColdFusion comment?
A. No
B. Yes
Ans:B
6. Determine the output below: #name#
A. TestServer
B. TestApp
C. No output. An error will be thrown.
D. John
E. Dave
Ans:D
7. Exceptions that are handled and catched by a tag are automatically logged in the Application.log file.
A. FALSE
B. TRUE
Ans:A
8. Which of these is a valid CFML tag?
A. cfsave
B. cfsilent
C. cfenter
D. cfdraw
E. cfwrite
Ans:B
9. ColdFusion is compiled to what prior to execution?
A. Active Server Pages
B. Java bytecode
C. HTML
D. CFML
Ans:B
10. I want to use a CFC function as a web service. I should set the access attribute of that function to:
A. package
B. public
C. remote
D. private
Ans:C
11. In ColdFusion 10, Adobe replaced their JRun application server with:
A. Tomcat
B. Zend
C. Jetty
D. Mono
Ans:A
12. True or False? You cannot use multiple tags inside of a tags.
A. False
B. True
Ans:A
13. True or False? You can run a PL/SQL or TSQL block inside a cfquery.
A. FALSE.
B. TRUE.
Ans:B
14. If I suspect my ColdFusion is encountering errors while sending email via SMTP, where should I look for clues?
A. in the mail.log file inside the ColdFusion log directory
B. ask the administrator of the email server for help
C. in the error.log file inside the ColdFusion log directory
D. in the output of a tag
Ans:A
15. variables are stored in what?
A. a list called FORM
B. a structure called FORM
C. an array called POST
D. an array called FORM
Ans:B
16. True or False: You can manage multiple ColdFusion servers from a single view within Adobe ColdFusion Builder?
A. True
B. False
Ans:A
17. In a ColdFusion component, an init() method is mandatory
A. Yes, without it, you cannot create an object for that CFC
B. No. Its just a convention
Ans:B
18. Which of the following is not a ColdFusion application framework?
A. FuseBox
B. ColdBox
C. Zend
D. CFWheels
E. Framework 1 (FW/1)
Ans:C
19. Where can I find the Code Compatibility Analyzer?
A. It comes with the FuseBox framework.
B. In the Debugging & Logging section of your ColdFusion Administrator interface.
C. You have to download and install it from Adobe’s ColdFusion page.
Ans:B
20. What is the default delimiter when looping through a list with ?
A. period (.)
B. comma (,)
C. space ( )
D. None of these
Ans:B
21. True or False: Unlike many programming languages, the first index in an array in Coldfusion is 1, instead of 0.
A. True
B. False
Ans:A
22. What is the modulus operator in CFML?
A. #%
B. %
C. ##
D. Mod
Ans:D
23. #myFunction()# What will be outputted after the above code is executed?
A. An empty string.
B. The string ‘Default’.
C. An error because the required attribute in the cfargument tag defaults to true.
Ans:B
24. Which Client variables are reserved?
A. Client.LastVisit
B. Client.CFID
C. All of these
D. Client.CFToken
Ans:C
26. What is the correct output in the following code: #ListGetAt(sweek, 3)#
A. Wednesday
B. n
C. Thursday
D. 3
Ans:A
27. Arrays in ColdFusion start at which index?
A. -1
B. 0
C. 1
D. None of these.
Ans:C
28. I want to invoke a CFC method from within a tag. Which function must I use to do this?
A. ToScript
B. CreateObject
C. ObjectLoad
Ans:B
29. What is the Code Compatibility Analyzer?
A. a tool that analyzes and optimizes your SQL queries
B. a tool that reviews older cfm pages for deprecated and unsupported cfml tags.
C. a tool that helps you debug JSON-related issues.
Ans:B
30. The CGI scope is read only
A. True
B. False
Ans:A
31. The following code does what? #DateFormat(Now(), “m/d/yyyy”)#
A. Converts the current date to a numeric value
B. Prints the current date in M/D/YYYY format
C. Prints the current date in MM/DD/YY format
D. Prints the current date in MM/DD/YYYY format
Ans:B
32. Which is a required method in Application.cfc?
A. OnBeginRequest
B. OnApplicationStart
C. OnRequestEnd
D. OnError
Ans:B
33. Which of these is NOT a valid CFML tag?
A. cfscript
B. cfsilent
C. cfchoice
D. cfloop
E. cfquery
Ans:C
35. Which is a required attribute of ?
A. subject
B. to
C. from
D. All of these
Ans:D
36. controls cannot be stylized using CSS like conventional HTML form controls.
A. True. CFML form controls are different from conventional HTML form controls, and thus require to different styling/formatting mechanisms
B. False. CFML form controls are rendered by the browser as conventional HTML form controls and can be formatted/stylized the same way.
Ans:B
37. Which of the following ISN’T a method you’d expect to find in Application.cfc?
A. OnApplicationEnd
B. OnServerStart
C. OnSessionEnd
D. OnRequest
E. OnApplicationStart
Ans:B
38. True or False? The tag is deprecated on UNIX platforms.
A. True
B. False
Ans:A
39. What ColdFusion tag should one use to help prevent a possible race condition scenario?
A. cfapplication
B. Unnecessary, because ColdFusion handles this automatically.
C. cfmodule
D. cflock
E. cfthread
Ans:D
40. Which of the following is NOT a valid scope type in ColdFusion?
A. server
B. form
C. request
D. client
E. component
Ans:E
41. True or false: It is necessary to add a default parameter in a function whose required type is set to no.
A. True
B. False
Ans:B
42. How would you access the first element of an array called attendees?
A. attendees[0]
B. attendees[1]
Ans:B
43. True or False: code within a CFThread tag body actually executes as a function call.
A. False
B. True
Ans:B
44. Which ColdFusion tag invokes a custom tag for use in ColdFusion application pages?
A. cfmodule
B. cfassociate
C. cfinterface
D. cfimport
Ans:A
45. The tag can:
A. Read and create both RSS and Atom feeds.
B. Can read and create RSS feeds, but not Atom feeds.
C. Read, but not create, RSS and Atom feeds.
D. Create, but not read, RSS and Atom feeds.
Ans:A
46. What does the name attribute of the tag do?
A. Nothing. There is no name attribute for the tag.
B. It specifies which remote server you want ColdFusion to contact.
C. It tells ColdFusion the name of the file you want to retrieve from the remote server.
D. It creates a query object from the returned HTTP response body with the name you provide.
Ans:D
47. What should I do if I’ve forgotten the CF Administrator password on a ColdFusion 10 server?
A. Delete the neo-security.xml configuration file, and generate a new one from within the CF Administrator.
B. Edit the password in your neo-security.xml file.
C. Use the passwordreset script inside the bin folder to create a new password.
Ans:C
48. In the Directory Watcher event gateway’s configuration file, which of the following property is required?
A. directory
B. extensions
C. recurse
D. interval
Ans:A
49. True or False? In ColdFusion 10, if you don’t specify strict attribute for , you should specify MIME types for the accept attribute.
A. FALSE
B. True
Ans:B
50. Hello Goodbye The above code will result in:
A. ‘Goodbye’ printed.
B. ‘Hello’ printed.
C. An error.
Ans:C
51. ColdFusion syntax supports a do-while loop
A. False
B. True
Ans:B
52. Determine the output below: #item#
A. nop,qrs
B. klm;
C. ;klm
D. klm
E. efg
Ans:D
53. Which of the following is correct format of comment within block?
A. # this is a comment
B.
C. /* This is a comment
D. // this is a comment
Ans:D
54. What is the correct way of getting the last_name of a user from a tag below? SELECT first_name, last_name, email FROM users
A. Both
B. qryUsers[“last_name”]
C. qryUsers.last_name
Ans:A
55. What is the default method for ?
A. post
B. enctype
C. get
Ans:A
56. What does the following code result in: Array Struct
A. An error
B. Array
C. Struct
Ans:C
57. True or False: It is a good idea to enable RDS on your ColdFusion production servers.
A. False
B. True
Ans:A
58. Complete this analogy: In ColdFusion ORM, CFCs are to database tables, as properties are to:
A. Stored procedures
B. Indexes
C. Primary keys
D. Columns
Ans:D
59. Where is considered the best place to name your application so the request is tied to the right application?
A. In Application.cfm.
B. Both
C. Inside Application.cfc but outside of any methods.
Ans:B
60. Which of the following prints out “Fail”?
A. Success Fail
B. Success Fail
C. Success Fail
D. Success Fail
Ans:D
61. #x# What will be output after the above code executes?
A. 321
B. 123
Ans:A
62. How many remote IP addresses can access an installation of the free developer edition of Adobe ColdFusion?
A. Trick question – the developer edition of ColdFusion isn’t free.
B. None. Only localhost access is possible.
C. 2
D. 5
E. 1
Ans:C
63. True or False? In ColdFusion 8, you can upload multiple files at once by setting CFFILE action to “uploadAll”
A. False
B. True
Ans:A
64. Which of the following is NOT a required Application.cfc setting for using ORM?
A. this.name
B. this.datasource
C. this.ormenabled
D. this.ormsettings
Ans:D
66. Which of the following versions of ColdFusion has passed its core support deadline, but is still within its extended support period?
A. Adobe ColdFusion 8
B. Macromedia ColdFusion 7
C. Adobe ColdFusion 10
D. Adobe ColdFusion 9
Ans:A
67. True or False: For un-scoped or unspecified scope variables, Coldfusion takes into consideration the Cookie scope before the Form scope.
A. True
B. False
Ans:B
68. Which of the following is NOT a valid Array function?
A. ArrayAppend()
B. ArrayDelete()
C. ArrayClear()
D. ArrayNew()
Ans:B
69. Which of the following IS NOT used to create a XML document object?
A. XMLNew function
B. tag
C. XMLParse function
D. XMLFormat function
Ans:D
70. By default, in which scope does a ColdFusion application store login information?
A. Request
B. Cookie
C. Session
D. URL
Ans:B
71. Can ColdFusion create a CAPTCHA?
A. No, ColdFusion cannot do that.
B. Yes, there is a tag.
C. Yes, with the tag.
Ans:C
72. What is the outcome of the following piece of code? #CGI.newVar#
A. CF
B. NULL
C. Error
Ans:C
74. From the below array, how do you access the value “banana”?
A. arrFruits[2] only
B. arrFruits[“2”] only
C. arrFruits[2] and arrFruits.2
D. arrFruits[“2”] and arrFruits[2]
E. arrFruits.2 only
Ans:D
75. What is the correct output for the following? #str2
A. The quick brown fox jumped over the lazy dog
B. Nothing. The script throws an error.
C. Thequickbrownfoxjumpedoverthelazydog
D. The-quick-brown-fox-jumped-over-the-lazy-dog
Ans:B
76. Given a page, customtag.cfm, called with will invoke the code twice whereas called with will invoke the code once.
A. No. As with XHTML, closing the tag is good coding practice.
B. Yes.
Ans:B
77. I just added a record to a table with an auto-incrementing primary key. If I stored the results of my query in a variable called lastRecord, how would I find the primary key of the record I just added?
A. lastRecord.RecordCount
B. lastRecord.IDENTITYCOL
C. lastRecord.GENERATED_KEY
D. lastRecord.generatedKey
E. lastRecord.ROWID
Ans:D
78. As in JavaScript, in ColdFusion you can write a function inside another function
A. True
B. False
Ans:B
79. True or False? Using to loop over a file opens the entire file in memory.
A. True
B. False
Ans:B
80. True or False? Arrays are passed by reference like Structs.
A. FALSE.
B. TRUE.
Ans:A
81. What does this code do? #DateFormat(date, “dd mmm yyyy”)#
A. Error. You cannot specify such values to loop.
B. Display dates from Jan 1st 2012 to Dec 31st 2012.
Ans:B