Adobe ColdFusion 2015

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?
Answers:
• cfupdate
• cftransaction
• cftry and cfcatch
• cfrollback

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


No comments:

Post a Comment