nerdexam
Cisco

300-435 · Question #70

YANG modeling supports which two comment styles? (Choose two.)

The correct answer is D. A block comment is enclosed within"/*" and"*/". E. A single-line comment starts with "//"and ends at the end of the line. YANG modeling supports single-line comments starting with // and block comments enclosed within / and /.

Network Automation Foundation

Question

YANG modeling supports which two comment styles? (Choose two.)

Exhibit

300-435 question #70 exhibit

Options

  • AA block comment is enclosed within"<--" and"-->".
  • BA single-line comment starts with "#"and ends at the end of the line.
  • CA single-line comment starts with "/"and ends at the end of the line.
  • DA block comment is enclosed within"/" and"/".
  • EA single-line comment starts with "//"and ends at the end of the line.

How the community answered

(33 responses)
  • B
    3% (1)
  • C
    6% (2)
  • D
    91% (30)

Why each option

YANG modeling supports single-line comments starting with `//` and block comments enclosed within `/*` and `*/`.

AA block comment is enclosed within"<--" and"-->".

The comment style `<-- -->` is typically used in XML, not YANG.

BA single-line comment starts with "#"and ends at the end of the line.

The `#` character is used for comments in many scripting languages and configuration files, but not for single-line comments in YANG.

CA single-line comment starts with "/"and ends at the end of the line.

A single forward slash `/` does not signify a comment in YANG; it requires two forward slashes `//` for single-line comments.

DA block comment is enclosed within"/*" and"*/".Correct

In YANG, a block comment is correctly defined as being enclosed within `/*` and `*/`, allowing for multi-line comments within the model definition.

EA single-line comment starts with "//"and ends at the end of the line.Correct

YANG utilizes `//` to denote a single-line comment, with all text following these characters until the end of the line being treated as a comment.

Concept tested: YANG comment syntax

Source: https://datatracker.ietf.org/doc/html/rfc7950#section-6.1.6

Topics

#YANG syntax#Comments#Data modeling

Community Discussion

No community discussion yet for this question.

Full 300-435 Practice