Sunday, March 25, 2012

Test Your ColdFusion skill ( Part - II)(ColdFusion - 8 and 9 )




  1. Which of following tags with errors will NOT be caught with a <cfcatch > block?
    < CFEST X = 5 / 0 >
    < CFSET X = "Y" + 1 >
    < cfinclude template="myFile.cfm" > where myFile.cfm is NOT found.
    None of these.

  2. If you have the following variable definition in the Application.cfm file, what is the scope of the variable after it is created?
    < cfset x="foo" >

    Variables (local)
    Application
    Session
    Request

  3. Which of the following scope variables can not store a ColdFusion query object?
    Request Scope Variables.
    Thread Scope Variables.
    Client Scope variables.
    Local scope Variables.

  4. What will be the outputof the following code?
    ABC < cfcontent reset="Yes" type="text/html" > DEF.

    ABC
    DEF
    ABCDEF
    None Of these

  5. Choose the correct syntax for looping over a structure.
    < cfloop collection="struct" item="i" >
    < cfloop collection="#struct#" item="s" >
    < cfloop from="#struct#" index="i" to="#StructLen(struct)#" >
    < cfloop collection="#struct#" index="i" >

  6. Which of the following is not true about < cfheader >?
    It creates attribute/value pairs in the request header.
    It creates attribute/value pairs in the response header.
    It can be used to prevent a server from caching a page.
    None of these.

  7. What is the correct syntax to include a template ?
    < cfinclude template="./myinclude.cfm" >
    < cfinclude template="C:\inetpub\wwwroot\doccomments\myinclude.cfm" >
    < cfinclude template="http://localhost:8500/doccomments/myinclude.cfm" >
    None of these.

  8. What is the output of below code?
    < cfset variables.str="Hello" >
    < cfoutput > #variables.str# </cfoutput >
    < cfsilent>
    < cfset variables.str="World" >
    < cfoutput> #variables.str # </cfoutput >
    < /cfsilent >

    Hello World
    Hello
    World
    None of these.

  9. Which of the following not true about structCopy() and duplicate() ?
    structCopy(): Copies nested structures by reference.
    structCopy(): If the original structure get changed then it doesn't affects the copied structure.
    duplicate(): There is no reference to the original variable
    duplicate(): This is also known as deep copy.

  10. Which of the following will not “obey” a timeout, whether it is set in the ColdFusion Administrator or in code on the CFM page?
    cfquery
    cfthread
    cfstoredproc
    None of these.



No comments:

Post a Comment

Followers