40 NOT Answered Yet Test Questions:
(hold on, will be updated soon)1. What is the final outcome of the serialization process during the processing of YAML information?
Answers:
• A YAML serialization graph
• A YAML serialization node
• A YAML serialization tree
• An unordered YAML serialization tree
2. Which of the following can be used to make ordered sequence of key:value pairs without duplicates?
Answers:
• --- !omp - Mark McGwire: 65 - Sammy Sosa: 63 - Ken Griffy: 58
• --- !!omap - Mark McGwire: 65 - Sammy Sosa: 63 - Ken Griffy: 58
• --- !!map - [Mark McGwire: 65] - [Sammy Sosa: 63] - Ken Griffy: 58
• --- !!otree - [Mark McGwire: 65] - [Sammy Sosa: 63] - Ken Griffy: 58
3. The code snippet below shows the sequencer protocols for Laser eye surgery. What function does the symbol << in line 8 perform?
---
Line 1 - step: &id001
Line 2 instrument: Lasik 2000
Line 3 PulseEnergy: 5.4
Line 4 PulseDuration: 12
Line 5 Repetition: 1000
Line 6 spotSize: 1mm
Line 7 - step:
Line 8 <<: *id001
Line 9 spotSize: 2mm
Line 10 - step:
Line 11 <<: *id001
Line 12 pulseEnergy: 500.0
Line 13 alert: >
Line 14 warn patient of
Line 15 audible pop
Answers:
• It ignores newlines, and their only purpose is to make the text readable.
• It indicates the value of spotSize be updated to 2mm.
• It allows multi-word keys to be represented unambiguously.
• It merges the key:value pairs defined in step 1 anchor.
4. Which of the following failure points can arise while loading native data structure from a YAML stream?
Answers:
• Stream may be ill-formed.
• Aliases may be unidentified.
• Native may be available.
• Node styles may be unavailable.
5. Which of the following is a valid format for declaring a numeric value as a string in YAML using an explicit datatype tag?
Answers:
• !string 123
• !! char 123
• !! str 123
• @ str 123
6. Which of the following is the correct syntax for describing hashes of lists in YAML?
Answers:
• men: [John Smith, Bill Jones] women: - Mary, Smith,John - Susan Williams
• men: [John Smith, Bill Jones] -[ Mary Smith] - Susan Williams
• men: {John Smith, Bill Jones} women: - [women:Mary Smith] - Susan Williams
• men: [John Smith, Bill Jones] women: - Mary Smith - Susan Williams
7. Which of the following symbols is used to explicitly define a datatype in YAML?
Answers:
• !!
• !
• &
• @
8. Which of the following translation stages are followed during the reconcilation of YAML information?
Answers:
• Representation
• Serialization
• Application
• Presentation
9. What is the final result produced by the compose stage during the processing of YAML information?
Answers:
• A representation tree
• An ordered tree
• An event tree
• A representation graph
10. Which of the following contents can be included in the YAML nodes?
Answers:
• Scalar
• Serialization
• Mapping
• Sequence
• Tags
11. Which of the following statements is/are true about parsing during the processing of YAML information?
Answers:
• Parsing is the inverse of presentation.
• Parsing deals with formatting a series of characters in a human-friendly manner.
• Parsing discards all the details introduced in the presentation process.
• Parsing is responsible for producing a representation graph.
12. Which of the following correctly describes the Verbatim tags?
Answers:
• It must be surrounded by the < and > characters.
• It marks a node for future reference.
• It requires the tag resolution method to be used.
• It must either begin with a ! or be a valid URI.
13. Which of the following syntaxes allows a user to define local datatype in YAML?
Answers:
• --- myObject: !myClass{name :joe,age:15}
• --- myObject: !!myClass{name :joe,age:15}
• --- myObject: *myClass{name :joe,age:15}
• --- myObject: !- myClass{name :joe,age:15}
14. Which of the following symbols allows you to declare local tag in an application using YAML?
Answers:
• #
• !
• @
• :
15. Which of the following is the correct syntax for describing a list in YAML using inline format?
Answers:
• [ruby,{Python},Perl]
• {ruby,{Python},Perl}
• [ruby,Python,Perl]
• {lang:ruby,Python,Perl}
16. Which of the following correctly describes the characteristics of the flow style of node content in YAML?
Answers:
• It starts and ends at some non-space character within a line.
• It uses indicators to denote structure.
• It always extends to the end of a line.
• It uses indentation to denote structure.
17. Which of the following statements is not true about non-specific tags available in YAML?
Answers:
• They must be resolved to specific tags for a complete representation graph.
• They must include local and global tags.
• They are useful only for plain scalars.
• They include non-specific tags such as ? and !.
18. Which of the following is the correct syntax for describing hashes in YAML in inline block format?
Answers:
• [username:smith,uid:1138]
• {username:smith,uid:11387}
• !Username:john,uid-1234
• - username:smith, uid:1138
19. In which of the following cases are two nodes in YAML considered to be equal?
Answers:
• If they represent the same tag
• If they represent the same content
• If they represent the same native data structure
• If they represent the same tag and content
20. Which of the following non-specific tags are available in YAML?
Answers:
• Local tag
• !
• ?
• Global tag
21. Which of the following correctly describes the anchor property of a node in YAML?
Answers:
• It marks a node for future reference.
• It needs to be referenced by some alias node.
• It identifies the type of native data structure presented by the node.
• An anchor is denoted as ! indicator.
22. Which of the following statements correctly describes the functions performed by a YAML processor?
Answers:
• It works on behalf of another module called application.
• It processes a syntax for presenting a YAML representation as a series of characters.
• It represents the tool for converting information between a YAML stream and a representation.
• It represents the tool for describing a class of data objects.
23. Which of the following symbols allows you to declare comments in YAML?
Answers:
• !
• @
• ?
• #
24. Which of the following character symbols should not be used with the primary tag handle?
Answers:
• !
• Valid URI
• !!
• "TAG" directive
25. Which of the following parameters must be mentioned while resolving the tag of a node in YAML?
Answers:
• The non-specific tag of the node
• The specific tag of the node
• The content of the node
• The path leading from the root node to the node
26. Which of the following correctly describes the syntax for representing an integer in YAML with scalar plus the global tag?
Answers:
• "tag:yaml.org,2002:int"
• "globaltag:yaml.org,2002.int"
• "tag.yaml:org,2002:int"
• tag:yaml.org,2002:int
27. Which of the following stages of YAML information reconciliation is responsible for achieving portability between different programming environments?
Answers:
• Presentation
• Serialization
• Representation
• Application
28. Which of the following is the correct syntax for describing a list of hashes in YAML?
Answers:
• - {name: John Smith, age: 33} - name: Mary Smith age: 27
• - [name: John , age: 33] - name: Mary Smith age: 27
• - name: John Smith, age: 33 - [name: Mary Smith] age: 27
• - {name: John Smith, age: 33} - - name: Mary Smith [ age: 27]
29. Which of the following presentation details are not considered while resolving the tag of a node in YAML?
Answers:
• Comments
• Indentation
• The content of the key node directly along the path leading from the root to the resolved node
• The node style
30. Which of the following stages is responsible for converting a series of characters into a human-friendly manner such as comments, directives?
Answers:
• Representation
• Presentation
• Application
• Serialization
31. Which of the following correctly describes the syntax for declaring Verbatim tags?
Answers:
• !<!> foo
• !<!bar>baz
• !<tag:yaml.org,2002:str> foo:
• !<$:?>bar
32. Which of the following kinds of nodes helps in representing strings, integers, dates and other data types in YAML?
Answers:
• Mapping
• Sequence
• Scalar
• None of the above
33. Which of the following symbols is used to define nested tag namespace hierarchies in YAML?
Answers:
• #
• /
• ::
• \
34. Which of the following statements is true about the "ship-to" hash in the following code snippet?
---
receipt: Oz-Ware Purchase Invoice
date: 2007-08-06
customer:
given: Dorothy
family: Gale
items:
- part_no: A4786
descrip: Water Bucket (Filled)
price: 1.47
quantity: 4
- part_no: E1628
descrip: High Heeled "Ruby" Slippers
price: 100.27
quantity: 1
bill-to: &id001
street: |
123 Tornado Alley
Suite 16
city: East Westville
state: KS
ship-to: *id001
specialDelivery: >
Follow the Yellow Brick
Road to the Emerald City.
Pay no attention to the
man behind the curtain.
...
Answers:
• The ship-to hash content is copied from the bill-to hash content.
• The ship-to hash content will refer to the root item of the file.
• The ship-to hash content will inherit all the values of the items.
• None of the above
35. What is the use of --| indicator used in the code snippet below?
--- | There once was a man from Newyork
Who got on a Bus bound for Newjersey.
It said on the door "Please don't spit on the floor"
Answers:
• It is used to remove the leading and trailing white spaces.
• It is used to preserve newlines as they appear.
• It ignores the newlines, as their only purpose is to make the text readable.
• None of the above
36. Which of the following are parts of the YAML information model?
Answers:
• Composition
• Serialization
• Presentation
• Nodes
37. Which of the following Type specifiers is/are available in YAML?
Answers:
• global URIs
• public
• private
• local
38. Which of the following correctly describes the functioning of YAML?
Answers:
• It is used primarily for data storage.
• It is a non human-readable data serialization format.
• It is a superset of JSON.
• It is more verbose than XML.
39. What is the significance of the "++" sign in the YAML information model?
Answers:
• It denotes serialization details.
• It denotes presentation details.
• It denotes node styles.
• It denotes relationships.
40. Analyze the following code snippet:
Line 1:%YAML 1.1
Line 2: ---
Line 3:!!str
Line 4:"specific\L\
Line 5:trimmed\n\n\n
Line 6:as space"
Line 7:"foo"
Which of the following would be the output of the above code?
Answers:
• Complied successfully
• Syntax error at line 5
• The case of a YAML directive should be small.
• Syntax error at line 6
No comments:
Post a Comment