Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/200

Click to flip

200 Cards in this Set

  • Front
  • Back
Which of the following are valid parts of a URL? (Select three)

A) Protocol
B) Port
C) CGI variables
D) Query string
A,B and D. CGI variables are usually sent when a URL is requested, but they are not part of the URL itself.
Which protocols may be used to access ColdFusion? (select two)

A) ftp
B) http
C) https
D) pop
B and C. All ColdFusion requests are submitted via a Web Server and thus via http or https.
Which of the following can ColdFusion access? (select three)

A) Databases
B) Client-side files
C) XML data
D) Microsoft Word
A, C, and D. ColdFusion runs on the server, not on the client, and therefore it can access only server resources, not client side files. As for Microsoft Word, files are accessible by ColdFusion if they reside on the server, not on the client.
The CFML language is made up of (select two)

A) Tags
B) XML
C) Functions
D) JavaScript
A and C. XML has nothing to do with CFML, and JavaScript is a client side technology.
Expressions are a combination of operands, operators, and functions. Which of the following are operands? (select two)

A) ColdFusion variables
B) MOD
C) 34
D) LCase()
A and C. MOD is an operator and LCase() is a function.
When no prefix is used, which scope would be used if values existed in all of the following for a variable of the same name?

A) FORM
B) URL
C) CLIENT
D) COOKIE
B. The order of evaluation dictates that the URL appears before the others.
Which of the following is the best syntax for an assignment statement?

A) <cfset #PassingDate#=#DateFormat(Now())#>
B) <cfset PassingDate=#DateFormat(Now())#>
C) <cfset #PassingDate#=DateFormat(Now())>
D) <cfset PassingDate=DateFormat(Now())>
D. Although all are legal, the best use of #s, or in this case lack of #s, is shown in D.
Which tag provides the greatest flexibility in verifying the presence of a variable and determining that its contents are valid?

A) <cfif>
B) <cfdump>
C) <cfparam>
D) <cfoutput>
A. <cfparam> can be used to check for the presence of variables and to verify that they are of the correct type, but <cfparam> supports a finite site of types. <cfif provides far more flexibility in that it can do all that <cfparam> can do, and much more too. (Although you'll have to write more code to get the job done).
What would the following code snippet display?

<cfset name="Ben">
<cfdump var="name">

A) The name Ben
B) The word VAR
C) The word name
C. <cfdump> accepts an expression, not a variable name. The output would have been A if Var="#name#"; without the #s the output will be the string name.
When no prefix is used, which scope would be used if values existed in all of the following for a variable of the same name?

A) CGI
B) CLIENT
C) FORM
D) VARIABLES
D. The order of evaluation dictates that the VARIABLES appears before the others.
What is the variable prefix for local variables?

A) LOCAL
B) VARIABLES
C) THIS
D) ATTRIBUTES
B. The VARIABLES prefix is used for local variables.
Expressions are a combination of operands, operators, and functions. Which of the following are operators?

A) Now()
B) ColdFusion variables
C) IS NOT
D) 78
C. Now() is a function and ColdFusion variables and the number 78 are operands.
Which of the following statements will add a new element, NY, to position 2 on the list variable States?

A) <cfset temp=ListSetAt(States,2,'NY')>
B) <cfset States=ListSetAt(States,2,'NY')>
C) <cfset temp=ListInsertAt(States,2,'NY')>
D) <cfset States=ListInsertAt(States,2,'NY')>
D. ListSetAt() updates an element in the provided list. List functions do not modify lists; rather, they return modified lists. So we need to specify States= on the left hand side of the statement in order to change the State list value (using temp= just creates a second list called temp).
Which of the following are lists? (select two)

A) Dates
B) Arrays
C) Structures
D) Strings
A and D. Strings always can be accessed as lists. Dates can be treated as strings and therefore are lists (usually delimited by slashes or hyphens). Arrays and structures can never be accessed as lists.
Which of the following are valid list delimiters?

A) ","
B) ""
C) "#Chr(13)##Chr(10)#"
D) "-"
A, C and D. Because it is an empty string, B is not valid. (ColdFusion will not throw an error, but the list will always contain one element.)
How many elements are in the list "Sid Wood"?

A) 0
B) 1
C) 2
D) 3
A, B, C, and D. By default, the list has one element. If a space is used as a delimiter, the list has two elements. If two characters are used as delimiters (for example, er or no), the list has three elements. If the delimiter contains all the characters Sid Wood, the list has no elements at all.
What will the following code snippet return?

<cfset liBurrows="City,Westminster,Hackney,Clapham,Islington">
<cfset strMyBurrow = ListGetAt(liBurrows,6)>
<cfoutput>#strMyBurrow#</cfoutput>

A) Islington
B) NULL
C) A ColdFusion Error
D) 0
C. Referring to an element that does not exist will cause ColdFusion to throw an error. It's a good idea to check the length of a list using ListLen() before accessing specific elements.
For variable scopes that do not require prefixes, list the order of evaluation of each scope.
1) Query result variables (in a <cfoutput> loop).
2) Function local variables (in UDFs or CFCs)
3) ARGUMENTS (in a UDF or CFC)
4) Local variables
5) CGI variables
6) URL variables
7) FORM variables
8) COOKIE variables
9) CLIENT variables
When no prefix is used, which scope would be used if values existed in all of the following for a variable of the same name?

A) URL
B) VARIABLES
C) CLIENT
D) CGI
B. The order of evaluation dictates that the local variables appear before the others.
Given the following code what would be the value of <cfoutput>#myCity#</cfoutput>?

<cfset cookie.myCity = "Paris" />
<cfset url.myCity = "Rome" />
<cfset form.myCity = "Vancouver" />
<cfset client.myCity = "New York" />

A) Paris
B) Rome
C) Vancouver
D) New York
B. The order of evaluation dictates that the URL scope appears before the others.
What is the ColdFusion operator for equals?

A) EQUALS
B) EQUAL
C) EQ
D) IS
B, C, and D. EQUALS is not a valid operator in ColdFusion.
What is the ColdFusion operator for not equal?

A) IS NOT
B) NEQ
C) NOT EQ
D) NOT EQUAL
A, B, and D. NOT EQ is not a valid ColdFusion operator.
What is the ColdFusion <cfif> operator for greater than?

A) GT
B) >
C) GREATER THAN
D) GRTH
A and C. The others are not valid operators in ColdFusion.
What is the ColdFusion <cfif> operator for less than or equal?

A) LT OR EQUAL
B) LTE
C) LESS THAN OR EQUAL
D) <=
B and C. The others are not valid operators in ColdFusion.
Which of the following operators are used to test for equality? (select two)

A) ==
B) IS THE SAME AS
C) IS
D) =
E) EQ
C and E. The others are not valid operators in ColdFusion.
Which of the following is logically equivalent to TRUE? (select all that apply)

A) -1
B) ON
C) 1
D) YES
A, C and D. Remember that any number except zero evaluates to true.
What would the following code generate?

<cfset name="Sid" />
<cfswitch expression="name">
<cfcase value="Sid">
Hello Sid.
</cfcase>
<cfcase value="Ben">
Hello Ben.
</cfcase>
<cfcase value="Sean">
Hello Sean.
</cfcase>
<cfdefaultcase>
I have no idea who you are.
</cfdefaultcase>
</cfswitch>

A) Hello Sid.
B) Hello Ben.
C) Hello Sean.
D) I have no idea who you are.
D. <cfswitch> takes an expression as an attribute. Since #s weren't used, name would not be evaluated.
How many different types of looping are there in ColdFusion? (list them in your mind)

A) 3
B) 4
C) 5
D) 6
C. There are five different types of looping in ColdFusion.

1) Index loops
2) Conditional loops
3) Query loops
4) List loops
5) Collection loops
Which of the following is not true of index loops?

A) They can iterate over numeric values.
B) \the loop value variable is assigned using the index attribute.
C) They can iterate over the alphabet.
D) They can step by negative increments.
C. Index loops can iterate only over numeric values.
What is the output from the following loop?


<cfset NumToGet="3">
<cfset i="1">
<cfloop condition="i LTE NumToGet">
<cfset i=i+1>
<cfoutput>#i#</cfoutput>
</cfloop>

A) 1 2 3
B) 2 3
C) 1 2
D) 2 3 4
D.Because the counter i is incremented and then displayed, the first value is 2. The number 4 is shown because the loop does not terminate immediately when the condition is false; rather, it finishes the loop.
A collection loop is used to loop over a structure that contains key-value pairs of Animal-Cow, Legs-4, Tail-Yes. What is the value of the attribute 'item' in the loop?

A) Animal, Legs, Tail
B) Animal. Cow, Legs. 4, Tail. Yes
C) Cow, 4, Yes
D) Cow, 4, Tail
A. The variable specified in the item attribute takes on the keys of the structure in the loop.
The loop variable is assigned using the index attribute in which types of loops?

A) Conditional
B) Index
C) Collection
D) List
B and D. The conditional loop has only one attribute, condition, and the collection loop used item.
What does the <cflocation> addtoken attribute do?


A) Forces a page redirect.
B) Creates SESSION variables.
C) Appends client identification information to the redirected URL.
D) Creates identification cookies in the client browser.
C. addtoken appends client identification information within the query string of ths redirected page. These may be set as cookies too, but not necessarily so.
Which of the following are true about <cfheader>? (select two)

A) It creates attribute/value pairs in the request header.
B) It creates attribute/value pairs in the response header.
C) It can be used to prevent a browser from caching a page.
D) If can be used to prevent a server from caching a page.
B and C. <cfheader> is used on the server side to alter response headers. The response header is sent to the browser and can tell it not to cache a page.
The following <cfinclude> tag uses what kind of path?

<cfinclude template="/template_mapping/header.cfm">

A) Relative
B) ColdFusion Mapping
B. The first character after the quotation mark is a forward slash (/) so a ColdFusion mapping is used.
What is displayed from he following code?

ABC<cfcontent type="text/html" reset="Yes">DEF

A) ABC
B) ABCDEF
C) ABEF
D) DEF
D. reset="Yes" clears any display before the tag, so ABC is not shown.
ColdFusion provides a framework for combining application pages or templates into a single coherent application. This application framework provides three basic sets of functionality. Select those three from the options below.

A) Application-wide variables and code.
B) Access the the server file system.
C) Error-handling services
D) Client and application state management.
E) Integration with mail servers.
A, C and D.
Which of the following Application.cfc methods is executed first?

A) onRequest()
B) onRequestStart()
C) onRequestEnd()
D) onRequestNew()
B. There is no onRequestNew() method, and onRequest() executes in between onRequestStart() and onRequestEnd().
Where must OnRequestEnd.cfm be in order to be executed?

A) In the current directory
B) In the Web Root
C) In the application root
D) in the same directory as the executed Application.cfm
D. Each OnRequestEnd.cfm is paired with an Application.cfm file. OnRequestEnd.cfm runs only if it is located in he same directory as the Application.cfm file that was executed.
When should onRequest() not be used? (select two)

A) When Web Services are being used.
B) When locking is being used.
C) When Flash Remoting is being used.
D) When onRequestStart() is being used.
E) When Flash is being used.
A and C. onRequest() cannot be used with Web Services or Flash Remoting.
When using Application.cfc, which method can be used to set local VARIABLES that can be used within the page being requested?

A) onRequestStart()
B) onRequest()
C) onRequestEnd()
D) None, local variables set within a CFC are local to the CFC.
B. Local variables are indeed local to the CFC, but as the requested page is included using <cfinclude> that page shares the CFC scope.
Which best describes the functionality of the onRequest() method of an Application.cfc?

A) Generally used to set request data.
B) If present it is executed in lieu of the page that was requested.
C) If present it is used for setting variables for Flash Remoting.
D) Generally used to preform some action after a page request has been completed.
B.
What variables does a <cfquery> query object contain?


A) RecordCount
B) ColumnList
C) ExecutionTime
D) DBTYPE
A, and B. DBTYPE is an attribute of the <cfquery> tag and execution time is not in the query object (it is returned as cfquery.executionTime)
<cfoutput> with the GROUP attribute requires which SQL clause in the SQL query?

A) WHERE
B) GROUP BY
C) ORDER BY
D) JOIN
C. Although the <cfoutput> group attribute can be used in conjunction with SQL GROUP BY operation, <cfoutput> group and GROUP BY are not related (the later is used when preforming aggregate calculation.).
What combination of attributes in <cfquery> does a query of queries require?

A) name and datasource
B) dbtype and datasource
C) name and query
D) name and dbtype
D. Query of queries requires a name and dbtype attributes.
Which of the following SQL operations can be preformed by using <cfquery>?

A) SELECT
B) INSERT
C) UPDATE
D) Stored Procedure
A, B, C and D. Any SQL statement can be passed to the database by using <cfquery>, provided that the destination driver can handle it.
What combination of attributes does a index loop require?

A) index, list, delimiters
B) index, from, to, step
C) index, from, to
D) collection, item
C. The step attribute is optional and defaults to 1.
What combination of attributes does a query loop require?

A) query, startrow, endrow
B) name, startrow, endrow
C) query
D) query, start, end
C. Startrow and endrow are optional attributes.
The cfquery tag returns which of the following result variables in a structure?

A) CurrentRow
B) RecordCount
C) Cached
D) sqlParameters
E) ExecutionTime
F) ColumnList
B, C, D, E, and F. CurrentRow is returned in the query object. RecordCount and ColumnList are in both the query object as well as the structure.
Which character is used to separate URL variables?

A) ?
B) =
C) &
D) %
C. If you got this one wrong you shouldn't take the exam.
Which function should be used to ensure that URL variables contain only safe text?

A) Trim()
B) URLEncodedFormat()
C) URLDecodedFormat()
D) Val()
B.
Which of the following is a valid method for creating URL variables?

A) <a href="index.cfm?#URLEncodedFormat("Emily Kim")#">
B) <cfset URLVar.FName="Emily">
C) <cfparam name="URL.FName" default="Emily">
D) <a name="index.cfm?#URLEncodedFormat("Emily Kim")#">
C.
What is the recommended METHOD to use when submitting forms to ColdFusion pages?

A) get
B) action
C) post
D) head
C. post is the safest method to use.
Which of the following is an example of a form control that does not pass a value to the action page by default?

A) Text box
B) Text area
C) Checkbox
D) Drop-down select control
C. A select control that allows multiple options but has none selected could act like a set of checkboxes (depending on the browser used). However, this question lists a drop-down select control. A drop-down by default always passes a value.
Consider the following checkboxes:

<input type="checkbox" name="FavCountry" value="US">United States
<input type="checkbox" name="FavCountry" value="CAN">Canada
<input type="checkbox" name="FavCountry" value="ENG">England
<input type="checkbox" name="FavCountry" valUE="FRA">France

If you checked France and Canada, what would your FORM variable look like?

A) FavCountry=CAN,FRA
B) FavCountry=CAN
C) FavCountry=FRA
D) FavCountry=CAN&FRA
A.
Which form of validation is the most secure?

A) Client-side
B) Auto-generated server-side
C) Manual server-side
C. Anything sent to the browser is inherently less secure than manual server-side validation.
Which of the following statements is true?

A) The use of SERVER variables must be explicitly enabled in ColdFusion administrator.
B) SERVER variables can always be used and cannot be disabled.
C) SERVER variables may be used as long as an Application file is present.
B. Unlike APPLICATION variables, SERVER variables are always available and may always be used. This cannot be prevented.
Where are APPLICATION variables stored?

A) Server memory
B) Server cookies
C) Client cookies
D) Database
A. All the others are incorrect.
Which Application.cfc method should be used to set SERVER variables?

A) onApplicationStart()
B) onServerStart()
C) onRequestStart()
D) onRequest()
E) none of the above
E. This is a trick question. There is no onServerStart() method, and although onApplicationStart(), onRequestStart() and onRequest() could indeed be used to set SERVER variables, so could any other files and code too, so there is no special reason why these should be used.
What value would you assign to the expires attribute of the <cfcookie> tag if you wanted to create a browser session cookie?

A) session
B) browser
C) now
D) Don't set the expires attribute.
D. Session and browser are not valid settings for the expires attribute. now would expire the cookie immediately. By not setting an expires attribute at all you create a browser session cookie.
Which variable types can be shared among clustered servers? (select two)

A) CLIENT
B) COOKIE
C) ColdFusion SESSION
D) J2EE SESSION
E) SERVER
A and D. CLIENT is the only variable type that is stored to disk, and J2EE session variables can be replicated between servers by the underlying J2EE Server.
Which of the following variables may store a ColdFusion query?

A) SESSION
B) CLIENT
C) COOKIE
A. CLIENT and COOKIE may only store simple data.
What combination of attributes does a query loop require?

A) query, startrow, endrow
B) name, startrow, endrow
C) query
D) query, start, end
C. Startrow and endrow are optional attributes.
Choose the legal <cflock> statement.

A) <cflock timeout="16">
B) <cflock name="myLock" scope="session" timeout="16">
C) <cflock scope="myLock" timeout="16" type="readonly">
D) <cflock name="myLock" timeout="16">
D. A is incorrect because <cflock> requires either the scope or the name attribute. B is incorrect because name and scope are mutually exclusive attributes. C is incorrect because the scope attribute must be a valid scope name.
Which variable scopes should be locked to ensure controlled access? (select all that apply)

A) REQUEST
B) CLIENT
C) SESSION
D) APPLICATION
E) SERVER
C, D and E. All three can be shared between requests.
When can deadlocks occur? (select two)

A) When locks are nested.
B) When locks are in a different order on different pages.
C) When locks wait for each other and are not nested.
D) When readonly locks are declared against the CLIENT scope.
A and B. C is incorrect because deadlocks occur only when locks are nested. D is incorrect because the CLIENT scope is not a variable type that requires locking.
Which of the following are lists? (select two)

A) Dates
B) Arrays
C) Structures
D) Strings
A and D. Strings can always be accessed as lists. Dates can be treated as strings and therefore as lists (usually delimited by slashes or hyphens).
Which of the following are valid list delimiters? (select all that apply)

A) ","
B) ""
C) "#chr(13)##chr(10)#"
D) "-"
B, C and D. Because it is an empty string, B is not valid.
What function do you use to create an array? (select two)

A) ArrayNew()
B) ListToArray()
C) ArrayCopy()
D) NewArray()
A and B. ArrayNew() is usually used to create an array, but ListToArray() can be used too. Neither C nor D is a valid function.
Why will the following code fail?

<cfset items=ArrayNew(1)>
<cfset items[1]=100>
<cfset items[2]=150>
<cfset items[4]=200>
<cfset total=ArraySum(items)>

A) Items is not an array.
B) Items is missing index 3
C) ArraySum() can't sum one-dimensional arrays.
D) ArraySum() is not a valid function.
B.
Why will the following code fail? (select two)

<cfset a=ArrayNew(1)>
<cfset ArrayResize(a,400)>
<cfset LoopUntil=ArrayLen(a)>
<cfloop from="1" to="#LoopUntil#" index="i">
<cfset ArrayDeleteAt(a,i)>
</cfloop>

A) <cfset requires an equals sign.
B) An array must be resized to a size greater than 500.
C) The index passed to ArrayDeleteAt() will be invalid.
D) The loop will go past the arrays length.
C and D.
Which of the following statements are false? (select two)

A) An associative array is a form of array.
B) Multidimensional arrays are "arrays in arrays".
C) Arrays can have a maximum of three dimensions.
D) One-dimensional arrays can contain simple values.
A and C.
Which of the following can be used in flash forms? (select three)

A) <cftextarea>
B) <cfinput type="submit">
C) <cfinput type="file">
D) <cfslider>
E) <cfselect>
A, B and E. <cfinput type="file"> is not supported, and <cfslider> is only supported as a Java applet, but not as flash.
Which tag is used to align and place form controls?

A) <cfform>
B) <cfformitem>
C) <cfformgroup>
D) <cfformalign>
C. A and B are valid tags but are not used for control alignment and placement, D is not a valid tag.
Which of the following requires the use of Adobe Flash or Adobe Flex (instead of Flash Forms)?

A) Bindings
B) Server-side events
C) Embedded expressions
D) Custom Controls
E) Control styling
B and D. Server-side events and the creation of custom controls requires the use of flash or flex.
What is a data binding in flash forms and how is it implemented?
Data Binding in flash forms allows controls to be connected to each other, so that they are aware of the values or changes in other controls and can react or change accordingly.

To implement binding you add the BIND attribute to the <cfinput> tag. The attribute takes an ActionScript expression using {} as delimiters (in much the same way as ColdFusion used #).
In a flash form, which of the following is NOT a valid type for <cfformitem>? (select two)

A) <cfformitem type="hrule">
B) <cfformitem type="hline">
C) <cfformitem type="vrule">
D) <cfformitem type="vline">
B and D.
In a flash form, which of the following is NOT a valid type for <cfformitem>? (select two)

A) <cfformitem type="text">
B) <cfformitem type="html">
C) <cfformitem type="space">
D) <cfformitem type="linebreak">
C and D. space and linebreak do not exist. There is a type="spacer" though.
Which of the following can be used in ColdFusion XForms?

A) <cftextarea>
B) <cfinput type="submit">
C) <cfinput type="file">
D) <cfslider>
E) <cfselect>
A, B, C, D and E. Any controls may be used, as long as the XSL skin used has been written to support them.
What is the minimum number of files needed to use XForms in ColdFusion?

A) 1
B) 2
C) 3
D) 4
B. At a minimum, a file containing a <cfform> and an .xsl file are needed.
What belongs in an XSL file in ColdFusion XForms?

A) Form action
B) Colours
C) Client-side Javascript
D) Submit button
B and C. The form action should not be in the .xsl, that is in the form itself. Similarly, no control definitions (including submit buttons) belong in the .xsl file.
In a ColdFusion form, is the following code snippet valid?

<cfformgroup type="page">
<cfformgroup type="accordion">
Item 1
</cfformgroup>
<cfformgroup type="accordion">
Item 2
</cfformgroup>
</cfformgroup>
No. <cfformgroup type="page"> must always be nested inside a <cfformgroup type="accordian"> or a <cfformgroup type="tannavigator"> form group.
In a ColdFusion form, is the following code snippet valid?

<cfformgroup type="accordion">
<cfformgroup type="page">
Item 1
</cfformgroup>
<cfformgroup type="page">
Item 2
</cfformgroup>
</cfformgroup>
Yes. <cfformgroup> can be nested and in the case of a </cfformgroup type="page"> it must be nested within a <cfformgroup type="accordion"> or <cfformgroup type="tabnavigation">
What does <cfformgroup type="tile"> do?
Places child controls in a grid.
What does <cfformgroup type="vbox"> do?
Align vertically, use only with nested groups and not for form controls.
Can form controls be nested within a <cfformgroup type="hbox">?
No, use only with nested groups and not for form controls.
What does <cfformgroup type="repeater"> do?

What arguments does it take?
Dynamically creates an instance of the cfformgroup's child tag or tags for each row of a query object, without requiring ColdFusion to recompile the Flash SWF file when the number of rows changes.

It takes a single query="" attribute.
Which of the following tags will not generate printable output? (select two)

A) <a href>
B) <p>
C) <script>
D) <b>
E) <embed>
F) <br>
G) <em>
C and E. Client-side scripting is not is not supported by the print rendered, nor are browser plugins.
Which tags are used to set print margins?

A) <cfdocument>
B) <cfdocumentmargin>
C) <cfdocumentitem>
D) <cfdocumentsection>
A and D. Margins can be set for the entire <cfdocument> as well at the <cfdocumentsection> level. B is not a valid tag, and C is incorrect because margins are nt set using <cfdocumentitem>.
What printable formats are supported by <cfdocument>?

A) Excel
B) FlashPaper
C) HTML
D) PDF
E) RTF
B and D. A (Excel) is supported by <cfreport> but not by <cfdocument>, C and E are not supported at this time.
How many tags are in the <cfdocument> family of tags? List them.
3. <cfdocument>, <cfdocumentitem>, <cfdocumentsection>.
Which of the following tags is not a valid tag?

A) <cfdocument>
B) <cfdocumentitem>
C) <cfdocumentsection>
D) <cfdocumentselection>
D. There is no <cfdocumentselection>.
The CFDOCUMENT scope exists inside the <cfdocument> tag and has what two properties?
"currentpagenumber" and "totalpagecount".
Which files are required required to execute reports generated using the ColdFusion Report Builder?

A) .cfc
B) .cfm
C) .cfr
C. .cfr files may be invoked directly, unless that functionality has been disabled.
What types of data can be passed to reports at runtime?

A) Arrays
B) Dates
C) Queries
D) Numbers
E) Strings
F) Structures
B,C,D,E. Queries may be passed to the query attribute, and all simple data types (including dates, numbers, and strings) may be passed as input parameters.
What output formats are currently supported by <cfreport>?

A) Excel
B) Flash Paper
C) HTML
D) PDF
E) RTF
A, B and D. C and E are not supported at this time.

*** E is now a correct answer as RTF was added in ColdFusion v7.0.1
Which of the following can be used to pass query data to <cfreport>?

A) <cfpop>
B) <cfstoredproc>
C) <cfsearch>
D) <cfdocument>
E) <cffile>
F) <cfoutput>
A,B,C. All of these return queries (they are not database queries but any query is usable), the other three do not return queries.
Like printable pages generated using <cfdocument>, reports generated via <cfreport> may be saved (instead of served) by specifying what attrbute?
filename="".
What file extensions does <cfreport> support?

A) .cfm
B) .cfc
C) .cfr
D) .rtp
E) .rpt
cfreport tag supports .cfr and still supports .rpt files used by Crystal Reports (legacy report system support).
Which are valid chart types?

A) gnatt
B) curve
C) step
D) bell
B and C. The rest are invalid.
What formats are supported by <cfchart>?

A) JPEG
B) FLASH
C) FlashPaper
D) GIF
E) PDF
F) PNG
A, B and F. Although charts may be embedded in other formats (like PDF and FlashPaper), only Flasj, JPEG, and PNG are directly supported.
Which is the valid <cfchart> url attribute?

A) url="details.cfm?value=#value#"
B) url="details.cfm?value=$value$"
C) url="details.cfm?value=value"
D) url="details.cfm?value={value}"
B. $ symbols are used to delimit charting values.
Which of the following cannot be achieved in a <cfscript> block? (select all that apply)

A) Variable assignments.
B) Looping
C) ColdFusion Component invocation.
D) HTTP requests.
E) CORBA object invocation.
F) Custom tag invocation.
D and F.
Choose the statements that are true.

A) There are more operators (such as ++ and &&) in scripting than in CFML.
B) Scripting is capable of doing everything CFML does.
C) switch and case are available only in <cfscript> blocks.
D) Scripting allows for do-while looping.
D. A is false because the same operators are used in CFML as in CFScript (but this statement is true in ColdFusion 8). B is false because CFML is capable of doing things that CFScript isn't. C is false because switch/case statements are available in both CFML and CFScript.
What is the output of the following code?

<cfscript>
x=1;
switch(x) {
case 1: {x=2; WriteOutput("World");}
case 2: {x=1; WriteOutput("Hello");}
}
<cfscript>

A) Hello World
B) World Hello World
C) World
D) World Hello
D. As no break statement is used, both lines of code are executed.
is the following script block valid?

<cfscript>
for(index lt 10; index=1; index=index+1;) {
writeOutput(index);
}
<cfscript>
No. The for() loop's first statement executes before the loop begins and since index has not been defined this code will throw an error.
is the following script block valid?

<cfscript>
for(index=1; index lt 10; index=index+1;) {
writeOutput(index);
}
<cfscript>
Yes.
How does the while loop operate in CFScript?

What type of <cfloop> in CFML is it similar too?
a while loop simply loops until a provided expression returns true.

x=1;
while (x GT 5) {
x=x+1;
writeOutput(x);
}

It is very similar to the conditional <cfloop> in CFML

<cfset x=1>
<cfloop condition="x GT 5">
<cfset x=x+1>
<cfoutput>#x#</cfoutput>
</cfloop>
What is the difference between a while loop and a do-while loop in CFScript?
The difference between a while loop and a do-while loop in CFScript is that the condition is tested after each iteration, rather than before.
What is the CFScript for-in loop used for?
The for-in loop is used to check a structure for a specific key.

for (x IN myStruct) {
//code to loop over goes here
}
List the three main dynamic functions used today in ColdFusion.
IIF(), DE(), and Evaluate().

SetVariable() sets variables where the variable name is a variable and is not used much anymore due to enhancements in the core language and tags.
If I want to output the sum of two variables, which of the following will work?

A) <cfoutput>#var1#+#var2#</cfoutput>
B) <cfoutput>#var1+var2#</cfoutput>
C) <cfoutput>evaluate(var1+var2)</cfoutput>
B and C. Evaluate() is not needed for simple expressions.
Choose all the statements that are true.

A) The DE() function is always used to display output.

B) The DE() function stops ColdFusion from processing expressions.

C) DE() and IIF() can be used together.

D) The letters in DE() stand for "do evaluation".
B and C. One of the purposes of DE() is to stop ColdFusion from evaluating an expression. This can be used in an IIf() function to return a literal rather than a value. Answer A is incorrect because DE() is not used only for output. Answer D is incorrect because DE stands for "delay evaluation".
What will be the output of the following code?

<cfoutput>#iif(1 is 1, "Evaluate(1,2,3)","'Hello'")#</cfoutput>

A) 1
B) 2
C) 3
D) Hello
C. The condition 1 IS 1 is true and returns the first of the two arguments. The first argument has three expressions within it (1,2,3 are three seperate expressions). Because ColdFusion always returns the last expression, the right most one is returned (3).
What does the following code do?

<cfset x="Array">
<cfset Evaluate("p = "&x&"New(1)")>

A) Creates an array named x.
B) Creates an array named p.
C) The code does not work.
D) None of the above.
B. The Evaluate() function can create expressions by concatenating strings and literals. The complete expression evaluates to "p=ArrayNew(1)", which creates a new array.
In the code below what does z equal?

<cfset x="y">
<cfset y="x">
<cfset z = IIf(x is y,DE(x),x)>

A) x
B) y
C) null
D) None of the above.
A. It might appear that the answer is B(y). However, because x has no quotes around it, it is actually evaluated twice. First, it is evaluated to see what it equals (y), and then that value is evaluated as an expression in itself, which equals "x". It is doubtful anything this difficult would be on the exam.
What does the letters in IIf() stand for?
Immediate If.
Why are stored procedures better than views or queries? (choose all that apply)

A) They execute faster.
B) They are more secure.
C) They are easier to create.
D) They are more powerful
E) They work with all databases.
A, B and D.
When should the type attribute of the <cfprocparam> tag be set to inout?

A) A parameter needs to be sent back from a stored procedure only.
B) A parameter is sent to a stored procedure and a different parameter is returned.
C) A parameter of the same name is sent and received from the stored procedure.
D) A stored procedure optionally accepts parameters
C.
<cfprocresult> returns what type of data?

A) Structure of queries.
B) Queries
C) Arrays
D) Simple data
B. <cfprocparam> can return arrays, but <cfprocresult> always returns queries.
Which of the following statements are true?

A) The <cftransaction> tag can controll isolation levels.
B) Isolation levels affect performance.
C) Isolation levels affect locking
D) ColdFusion enforces isolation when a database does not.
A,B and C. The <cftransaction> tag has an isolation attribute. Whether the database respects this isolation attribute is beyond your control. Isolation levels can effect performance, with serializable the worst performer and read uncommitted the best. Isolation levels also affect the way records are locked. D is the only answer that is false, because the database has full control over what is locked.
What is the primary purpose of <cftransaction>?

A) To commit all inserts to the database.
B) To make sure dirty reads do not take place.
C) To support commit and rollback features of a relational database system.
D) To supplement the <cflock> tag in locking database records.
C. Answer A is incorrect because <cftransaction> supports rollbacks as well as commits. B is incorrect because a dirty read is possible, depending on the isolation level. D is also incorrect because <cflock> has nothing to do with database transactions per se.
What isolation level provided to the <cftransaction> tag could allow "dirty reads" to occur?

A) serializable
B) read_committed
C) read_uncommited
D) repeatable_read
C.

A dirty read occurs when a certain transaction reads data that has not been committed.
What is wrong with the following code?

<cftransaction>
<cfquery datasource....> ... </cfquery>
<cftransaction action="commit">
</cftransaction>

A) Commits must be preformed in a <cfif> block
B) Inner <cftransaction> is not terminated
C) Transaction tags cannot be nested.
D) Queries must be preformed after commits are executed
B. If the inner <cftransaction tag were terminated the code would work.
Which isolation level is the least efficient?

A) serializable
B) repeatable_read
C) read_committed
D) read_uncommited
A.
Which isolation level is the second least efficient?

A) serializable
B) repeatable_read
C) read_committed
D) read_uncommited
B.
Which isolation level is the most efficient?

A) serializable
B) repeatable_read
C) read_committed
D) read_uncommited
D.
What types of variables are exposed through server-side debug options?

A) CGI
B) ARGUMENTS
C) REQUEST
D) SESSION
E) VARIABLES
A, C and D. Local variables and arguments, if present, are not exposed.
What would you use to time the execution of specific lines of code?

A) <cflog>
B) <cftimer>
C) GetTickCount()
D) Debug()
B and C. <cftimer> blocks and manual use of GetTickCount() are used to determine code execution time. <cflog> writes to log files and there is no Debug() function.
From which of the following can ColdFusion debugging output be accessed?

A) ColdFusion Administrator
B) Dreamweaver
C) cfstat
D) Web browser
B and D. Debug information is viewable withing Dreamweaver and via a web browser.
What is stored in the application.log file?
Logs problems reported to the user, including all runtime errors.
What is stored in the car.log file?
Logs problems with site archive and restore operations.
What are the two required arguments for the onError() method of the Application.cfc?
EventName - The name of the event handler that generated the exception (this will be a blank string if an error occured during page processing).

Exception - and exception structure containing the following error variables.

1) Browser
2) DateTime
3) Diagnostics
4) GeneratedContent
5) HTTPReferer
Can you use <cftry>/<cfcath> to catch a syntax error, such as a missing attribute?

A) YES
B) NO
B. You cannot use <cftry>/<cfcath> to handle syntax errors. Only runtime errors.
If the type attribute were not used in a <cftrow>, what type do you use in a <cfcatch> to handle the error?

A) Any
B) Application
C) Object
D) Template
E) Security
A and B. Any will catch all exceptions and Application will catch any custom error without a specified type.
Which of the following error handling tags have an equivalent in CFScript? (select two)

A) <cftry>
B) <cfcatch>
C) <cftrow>
D) <cfrethrow>
A and B.
Which of the following <cferror> types is used to check form input?

A) Form
B) Validation
C) Exception
D) Error
B.
Does a <cferror> tag or the onError() method in an Application.cfc override the error settings in the ColdFusion administrator?

A) YES
B) No
A.
What <cferror> type allows the execution of CFML tags on the included error template?

A) Validation
B) Exception
C) Request
B.
Where should <cflogin> be used? (select two)

A) In a <cfapplication> tag?
B) In Application.cfm
C) In Index.cfm
D) In OnRequestEnd.cfm
E) In Application.cfc
B and E.
When is a user logged out of an application? (select two)

A) When the time-out is reached.
B) When the next user logs in.
C) When the browser is closed.
D) When her password changes.
A and C. Users are logged out when a time-out occurs or when the browser closes (or when <cflogout> is invoked).
Which HTTP status code should be used to force a browser login form to be displayed?

A) 200
B) 401
C) 404
D) 500
B. 401 triggers the display of a login form.
Which code would you use to create a variable in a custom tag that would be passed back into the calling page?

A) <cfset FirstName = "Emily">
B) <cfset Caller.FirstName = "Emily">
C) <cfset SsetVariable(FirstName,"Emily")>
D) <cfset ExposeVariable(FirstName, "Emily")>
B.
Assuming a default installation on a Windows machine, which file could be executed if <cf_mytag> were used in your code? (select two)

A) C:\cfusionmx7\Mytag.cfm
B) MyTag.cfm in hte current directory
C) C:\cfunsionmx7\customtags\MyTag.cfm
D) C:\customtags\MyTag.cfm
B and C.
What is the best way to set default values for optional Custom Tag attributes?

A) <cfparam name="ATTRIBUTES.MyAttribute" default="MyValue">
B) <cfset MyAttribute="MyValue">
C) <input type="hidden" name="MyAttribute" value="MyValue">
D) <cf_mycustomtag myattribute="myvalue">
A.
Which variable of the ThisTag scope declares whether the tag is in start or end mode?

A) THISTAG.GeneratedContent
B) THISTAG.StartOrEnd
C) THISTAG.HasEndTag
D) THISTAG.ExecutionMode.
D.
In which execution mode should most Custom Tag processing typically occur?

A) start
B) end
C) inactive
B.
The <cfassociate> tag is used with nested Custom Tags to do what?

A) Pass generated content to the Custom Tag's end mode
B) Pass data from the start mode to the end mode?
C) Pass a child tag's data back to the parent tag
D) Pass a parent tag's data to the child tag.
C.
What does the GetBaseTagList() function do in a nested Custom Tag?
I returns a list of names of each tag surrounding and including the current tag.
In a nested Custom Tag, how does the child tag access data from the parent tag?
By using GetBaseTagData(tag_name) function which returns a structure with target tag attributes as keys.
What does the basetag attribute do in the <cfassociate> tag?
The basetag attribute names the parent tag to which you will be passing all the child tag data.
What does the datacollection attribute do in the <cfassociate> tag?

What happens if you do not include it?
The datacollection attribute allows you to name the array-of-structures returned which contains all the child tag's attributes.

If it is not included with the <cfassociate> tag the array-of-structures returned will be named AssocAttribs
Which of the following arrays contains information passed to a UDF?

A) Attributes
B) Arguments
C) Parameters
D) Var
B. Arguments is an array that contains every passed argument, regardless of whether it is enumerated explicitly.
Which of the following keywords creates protected variables withing a UDF?

A) var
B) set
C) return
D) variable
A. You must use the var keyword to create a variable local to the UDF. Omitting the VAR causes the variable to be created in hte calling code's scope.
What are the advantages of tag-based UDFs over <cfscript> based UDFs? (select two)

A) Execution speed
B) Automatic argument and type checking
C) Ability to be used as tag attributes
D) Ability to access any CFML language elements
E) Ability to be passed as a parameter to another UDF.
B and D. A is incorrect, as there is no difference in execution speed. C and E are incorrect, as the statements are true of both tag-based and <cfscript>-based UDFs.
Is it possible to scope UDFs like the snippet below?

<cfscript>
function myFunction(x) {
return(val(arguments.x)+1);
}
</cfscript>

<cfset REQUEST.myFunction=myFunction>

A) Yes
B) No
A. Yes you can scope UDFs.
When a UDF is passed as a parameter to another UDF, what two functions are available to check if the passed UDF operates as expected?
IsCustomFunction() - checks if a specified function is actually a UDF.

GetMetaData() - returns details about a function (the parameters it is defined to expect, what it returns, and so on) and can be used to check that a passed function is defined as intended.
What are valid reasons for using CFCs? (select three)

A) Reuse
B) Access to underlying Java
C) Tiered Development
D) Accessible outside of ColdFusion
E) Error handling
A, C and D.
What is wrong with the following code?

<cfobject component="emps" name="empsObj">
<cfinvoke component="empsObj" method="Get">

A) Missing path in <cfobject>
B) component in <cfinvoke> is not a valid object
C) <cfobject> is missing a method attribute
D) Missing a returnvariable attribute
B. empObj is missing # characters, and so a string is being passed instead of an object. A is incorrect as a is not always needed. C is incorrect as method is not used in <cfobject>. D is incorrect because returnvariable is always optional.
Which of the following <cffunction> arguments is required?

A) access
B) name
C) output
D) returntype
B.
Which <cffunction> argument is used to enable methods to be accessed ouside of local ColdFusion?

A) access
B) name
C) output
D) roles
A.
Using <cfobject> or CreateObject(), which scopes can components be instantiated in? (select four)

A) CLIENT
B) COOKIE
C) REQUEST
D) SERVER
E) SESSION
F) URL
G) VARIABLES
C, D, E, and G.
Which protocols are Web Services built on? (select two)

A) MIME
B) POP
C) SOAP
D) XML
E) LDAP
F) RSS
C and D. Web Service data is XML in a SOAP package.
Which tag is used to invoke web services?

A) <cfhttp>
B) <cfinvoke>
C) <cfobject>
D) <cfxml>
B. <cfinvoke> is used to invoke ColdFusion Components and Web Services. A is incorrect, as <cfinvoke> handles its own HTTP calls internally. C is incorrect, as only CFCs can be instantiated as objects, not Web Services. D is incorrect, as all Web Services' XML processing is handled by ColdFusion internally.
Which <cffunction> attributes are required for a function to be accessible as a Web Service? (select three)

A) access
B) name
C) output
D) returntype
E) roles
A, B and D. For a CFC function to be accessed as a Web Service, it must be named using NAME, acess must be set with access="remote", and the return type must be specified too.
What does the acronym, SOAP, stand for? What is it?
Simple Object Access Protocol.

SOAP is the protocol used to serving and consuming Web Services, much like HTTP is the protocol used in serving and viewing web pages.
What does WSDL stand for and what is it?
WSDL, Web Service Description Language, is an XML format used to describe the methods exposed by a web service, including what arguments those methods expect, what they return, the URL to each and so on.
What is the preferred extensibility interface for ColdFusion (as of ColdFusion MX)?

A) Java
B) COM
C) CFX
D) CORBA
A. As ColdFusion runs on underlying Java internally, Java is the preferred extensibility option.
What tag would you use to access a JSP Tag Library?

A) <cfobject>
B) <cfmodule>
C) <cfinvoke>
D) <cfimport>
D. <cfimport> is used to import JSP Tag Libraries. A is used to load objects (such as Java objects). B is incorrect, as <cfmodule> only works for CF Custom Tags. <cfinvoke> is also incorrect as it is used to invoke CFCs and Web Services.
What CFML language element can be used to invoke a Java object? (select two)

A) <cfobject>
B) JavaCast()
C) CreateObject()
D) <cfjava>
A and C.
What does the <cfimport> tag do?
<cfimport> tag is used to import all ColdFusion pages in a directory, as a custom tag library or to import a Java Server Page (JSP) tag library.
Before you can call a COM object from within ColdFusion code, you must first register it with the system.

A) TRUE
B) FALSE
A. This statement is true.
Which of the following CFML language elements create XML Document Objects? (select two)

A) <cfxml>
B) XMLParse()
C) XMLSearch()
D) XMLFormat()
A and B. <cfxml> creates XML Document Objects, as does XMLParse(). C and D are valid functions but do not create XML Document Objects.
Which of he following is used to convert an XML Document Object to its string representation?

A) XMLFormat()
B) XMLParse()
C) ToXML()
D) ToString()
D. ToString() creates an XML document from an XML Document Object. XMLParse() is exactly the opposite. XMLFormat() creates XML-safe text, and ToXML() does not exist.
Which of the following statements are true? (select two)

A) XML Documents may be case sensitive.
B) XML documents are in binary format.
C) XML documents contain page formating information.
D) XML documents must be well formed.
A and D. XML Documents may indeed be case sensitive, and they must be well formed (which is why ToString() should be used to generate the XML document). XML is not in a binary format (it is in plain text), and it does not (or should not) contain page formating information; XML describes data (not layout as HTML does).
What does XMLParse() do?
It creates an XML Document Object from a XML text string. The XML text string is created by using <cffile action="read"> on an XML document.
What does XMLValidate() do? What attributes does it take?
It compares an XML document to a supplied DTD (Document Type Definition).

It takes an XML document object or XML string or XML file name or path to a XML file.

Second, it takes a string containing a DTD or Schema or the name of a DTD or Schema file or the URL of a DTD or Schema file.
Which of the following is not a valid action attribute for the <cfwddx> tag?

A) CFML2ASP
B) CFML2JS
C) WDDX2CFML
D) CFML2WDDX
A. The other three are valid.
Which of the following options would you use to convert a ColdFusion two-dimensional array called names into a WDDX packet and write the results to the page?

A) <cfwddx action="CFML2WDDX" input="#names#">
B) <cfwddx action="CFML2PAGE" input="#names#">
C) <cfwddx action="CFML2WDDX" input="#names#" writetopage="Yes">
D) <cfwddx action="CFML2WDDX" input="#names#" output="This.page">
A. By not declaring an output attribute, you are telling ColdFusion to write the results of the WDDX packet to the page.
When outputting a WDDX packet to the page, by not declaring an output attribute, what should you ensure is disabled in the Administrator?
Debugging should be disabled or the html output at the bottom of the screen will corrupt the packet. You could also disable the output using <cfsetting showDebugOutput="No">.
Which of the following is not a valid action attribute for the <cfwddx> tag? (select two)

A) CFML2JS
B) CFML2WDDX
C) JS2WDDX
D) WDDX2JS
E) JS2CFML
C and E. The other three are valid.
Whats wrong with the code below?

<cfset arrTest = ArrayNew(1)>
<cfset arrTest[1] = "test">
<cfwddx action="CFML2WDDX" input="arrTest" output="NewPacket">
This just creates a WDDX packet of the literal string "arrTest". You need to place #s arounf the arrTest variable.
Whats wrong with the code below?

<cfset arrTest = ArrayNew(1)>
<cfset arrTest[1] = "test">
<cfwddx action="WDDX2CFML" input="#arrTest#" output="NewPacket">
The wrong type has been used. it should be CFML2WDDX not WDDX2CFML.
Which of the following can be invoked directly via Flash Remoting?

A) Custom Tags
B) ColdFusion Components
C) User-defined functions
B. Invoked code could indeed call Custom Tags or UDFs but these cannot be invoked directly from Flash.
Which scope is used to access data submitted via Flash Remoting? (select two)

A) ARGUMENTS
B) ATTRIBUTES
C) FLASH
D) URL
A and C. ARGUMENTS will contain passed arguments if invoking a CFC; FLASH will contain passed arguments if invoking a .cfm file.
Why are CFCs the prefered method for utilizing Flash Remoting? (select two)

A) Separation of presentation and content
B) Performance
C) Simplified integration
D) Access to all CFML
E) Portability
A and C. CFCs indeed encourage separation of content and they provide the simplest integration. B is false because CFCs are not automatically faster than .cfm files. D is false, since CFCs have the same access to CFML that straight .cfm files do. E is false, as CFCs and .cfm files are equally portable.
What are the limitations of server-side ActionScript?
Limited to database queries and server-side http requests.

Server-side ActionScript only exposes <cfquery> and <cfhttp>.
What does the DataGlue.as file do when included in ActionScript code that is has retrieved data from Flash Remoting?
It provides a function library called DataGlue used to bind data with objects.

DataGlue is not always needed as soem objects, like the DataGrid, can accept recordSets directly.
In Flash Remoting, when sending data back to the client from a .cfm page, what variable should you always use?
FLASH.result
In Flash Remoting, if a CFC method getGrades() returns data to the client, what function must exist in the Flash Movie to handle the results?
getGrades_Result()
Are Event Gateways supported in ColdFusion Standard Edition?

A) YES
B) NO
B.
What is the default number of available threads for Event Gateway processing assuming that it has not been altered in the ColdFusion Administrator?
10
What is the default request queue size for Event Gateways assuming that it has not been altered in the ColdFusion Administrator?
25,000
What function is used to initiate an event gateway request?

A) CreateObject()
B) OnIncommingMessage()
C) SendGatewayMesage()
D) SetGatewayMessage()
C. D is not a real function, and B is the name of the CFC method that is invoked to process gateway requests.
Which gateway types can be used to preform asynchronous processing? (select two)

A) JMS
B) CFML
C) Directory Watcher
D) XMPP
A and B. CFML preforms local asynchronous processing, and JMS provides access to distributed and asynchronous processing via Java messaging.
What is required for Gateway instance definition? (select two)

A) Gateway Type
B) Event Gateway Service
C) SendGatewayMesage() function
D) Configuration File
E) CFC File
A and E. Configuration file (D) is optional, B and C are incorrect.
Which verity features are inherent in a simple query expression? (select three)

A) stem operator
B) many modifier
C) near operator
D) Wildcards
A, B and C. The near operator is available only in explicit search expressions.
Which tag is used to optimize a Verity collection?

A) <cfcollection>
B) <cfindex>
C) <cfoptimize>
D) <cffile>
A and B. <cfcollection with the action="optimize" attribute is the preferred method of optimization. However, <cfindex> with the action="optimize" attribute is the old, deprecated method and is still backward-compatible.
Which variable scopes require the scope prefix when referencing the variable name?
Attributes, Caller (in the custom tag page), ThisTag, Request, cffile (following a cffile invocation), Session, Application, Server, Flash (A ColdFusion page or ColdFusion component called by a Flash client), this.
The <cfimport> tag must be on the CFML page that uses the imported tag(s), you cannot put the <cfimport> tag in the Application.cfm page, if that's not where you are using the imported tag(s).

A) TRUE
B) FALSE
A.