64.0k views
5 votes
Which of the following choices cannot be chosen as a function name?

A. division
B. poly-lagrange
C. nonlinear
D. velocity

User Yanli
by
7.8k points

1 Answer

5 votes

Final answer:

The name 'poly-lagrange' cannot be used as a function name because it contains a hyphen, which is against the conventions of function naming in many programming languages.

Step-by-step explanation:

The question asks which of the given choices cannot be used as a function name. In many programming languages, there are specific rules that determine what can and cannot be used as identifiers, which include function names. Generally, function names must start with a letter or an underscore, cannot contain spaces, and cannot be a reserved keyword in the programming language being used.

Based on these general rules:

  • division : Possible function name, provided it is not a reserved keyword.
  • poly-lagrange : Not possible as a function name because it contains a hyphen, which is not allowed in function names.
  • nonlinear : Possible function name, assuming it is not a reserved keyword.
  • velocity : Possible function name, provided it is not a reserved keyword.

Therefore, poly-lagrange cannot be chosen as a function name because it includes a hyphen, which is not typically allowed in function names across many programming languages.

User Guru Cse
by
8.3k points