nerdexam
Microsoft

MB6-704 · Question #76

You are developing a solution for a customer. You plan to add a local embedded function to perform a recursive operation by using the following code: You need to identify which variables can be…

The correct answer is B. MainMethodParamand CounterInMainMethod. The variables local to the to embededFunction cannot be accessed by MainMethod.

Develop X++ code

Question

You are developing a solution for a customer. You plan to add a local embedded function to perform a recursive operation by using the following code:

You need to identify which variables can be accessed from mainMethod. Which variables should you identify?

Exhibit

MB6-704 question #76 exhibit

Options

  • AMainMethodParamand embeddedFunctionParam
  • BMainMethodParamand CounterInMainMethod
  • CEmbededFunctionParam and CounterInembededFunction
  • DCounter InMainMethod and CounterInembededFunction

How the community answered

(54 responses)
  • A
    2% (1)
  • B
    83% (45)
  • C
    6% (3)
  • D
    9% (5)

Explanation

The variables local to the to embededFunction cannot be accessed by MainMethod.

Topics

#local function#variable scope#recursive#X++ scoping

Community Discussion

No community discussion yet for this question.

Full MB6-704 Practice