ColdFusion u0026 CFML Essentials Quiz Quiz

  1. CFML File Extensions

    Which file extension is commonly used for files containing ColdFusion Markup Language code?

    1. .cfm
    2. .php
    3. .cfml
    4. .cfs
    5. .cfmx
  2. Outputting Data

    Which CFML tag is used to display the value of a variable named message on a web page?

    1. u003Ccfoutputu003E#message#u003C/cfoutputu003E
    2. u003Ccfprintu003E@message@
    3. u003Ccfdisplayu003E$message$
    4. u003Ccfshowu003E{message}
    5. u003Ccfviewu003Emessageu003C/cfviewu003E
  3. Conditional Logic

    If you want to execute certain code only when a user is logged in, which CFML tag should you use to check this condition?

    1. u003Ccfifu003E
    2. u003Ccfcaseu003E
    3. u003Ccfwhileu003E
    4. u003Ccfswitchu003E
    5. u003Ccfwhenu003E
  4. Variables in CFML

    How do you correctly reference a variable called userName in a CFML template?

    1. #userName#
    2. #User-Name#
    3. user.Name
    4. $userName$
    5. [userName]
  5. Comments Syntax

    What is the correct CFML syntax for writing a single-line comment?

    1. u003C!--- This is a comment ---u003E
    2. // This is a comment
    3. u003C!-- This is a comment --u003E
    4. #-- This is a comment --#
    5. u003Ccfcommentu003EThis is a comment
  6. Loops in CFML

    Which CFML tag is used to loop through a set of items, such as an array or a query?

    1. u003Ccfloopu003E
    2. u003Ccfiterateu003E
    3. u003Ccfrepeatu003E
    4. u003Ccfrowu003E
    5. u003Ccfrunu003E
  7. Querying a Database

    To execute a SQL query and retrieve data from a database within a CFML page, which tag should you use?

    1. u003Ccfqueryu003E
    2. u003Ccfdatau003E
    3. u003Ccfsqlu003E
    4. u003Ccfsearchu003E
    5. u003Ccfdbu003E
  8. CFML Data Types

    Which of the following is NOT a common data type supported in CFML?

    1. Sound
    2. String
    3. Boolean
    4. Array
    5. Date
  9. Defining Functions

    What CFML tag is used to define a custom function inside your application?

    1. u003Ccffunctionu003E
    2. u003Ccffuncu003E
    3. u003Ccfmethodu003E
    4. u003Ccfdefineu003E
    5. u003Ccfprocu003E
  10. Passing Form Data

    When a form is submitted in a CFML application, through which scope can you access the submitted form fields?

    1. form
    2. input
    3. query
    4. post
    5. urlform