MCQs > IT & Programming > YAML Programming MCQs > Basic YAML Programming MCQs

Basic YAML Programming MCQ

1. Which of the following character symbols should not be used with the primary tag handle?

Answer

Correct Answer: !

Note: This Question is unanswered, help us to find answer for this one

2. Which of the following correctly describes the Verbatim tags?

Answer

Correct Answer: It must be surrounded by the < and > characters.

Note: This Question is unanswered, help us to find answer for this one

3. Which of the following correctly describes the characteristics of the flow style of node content in YAML?

Answer

Correct Answer: It starts and ends at some non-space character within a line.

Note: This Question is unanswered, help us to find answer for this one

4. Which of the following parameters must be mentioned while resolving the tag of a node in YAML?

Answer

Correct Answer: The content of the node

Note: This Question is unanswered, help us to find answer for this one

5. What is the significance of the "++" sign in the YAML information model?

Answer

Correct Answer: It denotes presentation details.

Note: This Question is unanswered, help us to find answer for this one

6. Which of the following presentation details are not considered while resolving the tag of a node in YAML?

Answer

Correct Answer: Comments

Note: This Question is unanswered, help us to find answer for this one

7. Which of the following Type specifiers is/are available in YAML?

Answer

Correct Answer: global URIs

Note: This Question is unanswered, help us to find answer for this one

8. Which of the following contents can be included in the YAML nodes?

Answer

Correct Answer: Scalar

Note: This Question is unanswered, help us to find answer for this one

9. Which of the following translation stages are followed during the reconcilation of YAML information?

Answer

Correct Answer: Representation

Note: This Question is unanswered, help us to find answer for this one

10. Which of the following symbols allows you to declare comments in YAML?

Answer

Correct Answer: #

Note: This Question is unanswered, help us to find answer for this one

11. Which of the following symbols allows you to declare local tag in an application using YAML?

Answer

Correct Answer: !

Note: This Question is unanswered, help us to find answer for this one

12. Which of the following is the correct syntax for describing hashes in YAML in inline block format?

Answer

Correct Answer: {username:smith,uid:11387}

Note: This Question is unanswered, help us to find answer for this one

13. Which of the following stages is responsible for converting a series of characters into a human-friendly manner such as comments, directives?

Answer

Correct Answer: Presentation

Note: This Question is unanswered, help us to find answer for this one

14. Which of the following symbols is used to define nested tag namespace hierarchies in YAML?

Answer

Correct Answer: /

Note: This Question is unanswered, help us to find answer for this one

15. Which of the following can be used to make ordered sequence of key:value pairs without duplicates?

Answer

Correct Answer: --- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffy: 58

Note: This Question is unanswered, help us to find answer for this one

16. Which of the following is a valid format for declaring a numeric value as a string in YAML using an explicit datatype tag?

Answer

Correct Answer: !! str 123

Note: This Question is unanswered, help us to find answer for this one

17. 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 do not spit on the floor"

Answer

Correct Answer: It is used to preserve newlines as they appear.

Note: This Question is unanswered, help us to find answer for this one

18. Which of the following non-specific tags are available in YAML?

Answer

Correct Answer: !

Note: This Question is unanswered, help us to find answer for this one

19. Which of the following statements is/are true about parsing during the processing of YAML information?

Answer

Correct Answer: Parsing is the inverse of presentation.

Note: This Question is unanswered, help us to find answer for this one

20. Which of the following is the correct syntax for describing a list of hashes in YAML?

Answer

Correct Answer: - {name: John Smith, age: 33}
- name: Mary Smith
age: 27

Note: This Question is unanswered, help us to find answer for this one

21. Which of the following statements is not true about non-specific tags available in YAML?

Answer

Correct Answer: They must include local and global tags.

Note: This Question is unanswered, help us to find answer for this one

22. What is the final outcome of the serialization process during the processing of YAML information?

Answer

Correct Answer: A YAML serialization tree

Note: This Question is unanswered, help us to find answer for this one

23. In which of the following cases are two nodes in YAML considered to be equal?

Answer

Correct Answer: If they represent the same native data structure

Note: This Question is unanswered, help us to find answer for this one

24. What is the final result produced by the compose stage during the processing of YAML information?

Answer

Correct Answer: A representation graph

Note: This Question is unanswered, help us to find answer for this one

25. Which of the following symbols is used to explicitly define a datatype in YAML?

Answer

Correct Answer: !!

Note: This Question is unanswered, help us to find answer for this one

26. Which of the following is the correct syntax for describing a list in YAML using inline format?

Answer

Correct Answer: [ruby,Python,Perl]

Note: This Question is unanswered, help us to find answer for this one

27. Which of the following is the correct syntax for describing hashes of lists in YAML?

Answer

Correct Answer: men: [John Smith, Bill Jones]
women:
        - Mary Smith
        - Susan Will

Note: This Question is unanswered, help us to find answer for this one

28. 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?

Answer

Correct Answer: Complied successfully

Note: This Question is unanswered, help us to find answer for this one

29. Which of the following kinds of nodes helps in representing strings, integers, dates and other data types in YAML?

Answer

Correct Answer: Scalar

Note: This Question is unanswered, help us to find answer for this one

30. Which of the following failure points can arise while loading native data structure from a YAML stream?

Answer

Correct Answer: Stream may be ill-formed.

Note: This Question is unanswered, help us to find answer for this one

31. Which of the following correctly describes the functioning of YAML?

Answer

Correct Answer: It is used primarily for data storage.

Note: This Question is unanswered, help us to find answer for this one

32. Which of the following correctly describes the anchor property of a node in YAML?

Answer

Correct Answer: It marks a node for future reference.

Note: This Question is unanswered, help us to find answer for this one

33. Which of the following correctly describes the syntax for declaring Verbatim tags?

Answer

Correct Answer: !<!bar>baz

Note: This Question is unanswered, help us to find answer for this one

34. Which of the following statements correctly describes the functions performed by a YAML processor?

Answer

Correct Answer: It works on behalf of another module called application.

Note: This Question is unanswered, help us to find answer for this one

35. Which of the following correctly describes the syntax for representing an integer in YAML with scalar plus the global tag?

Answer

Correct Answer: "tag:yaml.org,2002:int"

Note: This Question is unanswered, help us to find answer for this one

36. Which of the following stages of YAML information reconciliation is responsible for achieving portability between different programming environments?

Answer

Correct Answer: Representation

Note: This Question is unanswered, help us to find answer for this one

37. Which of the following are parts of the YAML information model?

Answer

Correct Answer: Composition

Note: This Question is unanswered, help us to find answer for this one

38. Which of the following syntaxes allows a user to define local datatype in YAML?

Answer

Correct Answer: ---
myObject: !myClass{name :joe,age:15}

Note: This Question is unanswered, help us to find answer for this one