Computer Science, asked by darshansekar2901, 8 months ago

3. The functions which will give exact result when same arguments are passed are called
(A) Impure functions
(B) Partial Functions
(C) Dynamic Functions
(D) Pure functions​

Answers

Answered by amanpuneet
1

Answer:

Pure functions

Explanation:

Its return value is the same for the same arguments..

Answered by Jasleen0599
0

Option D) Pure functions​

The functions which will give exact result when same arguments are passed are called Pure functions​.

  • The following traits define a pure function in computer programming: the function return values are the same for identical arguments (there is no variation with local static variables, non-local variables, mutable reference arguments, or input streams); and.
  • A function is said to be pure if it consistently gives the same result for identical parameter values and has no side effects, such as producing anything or altering an argument (or global variable).The return value is the only outcome of calling a pure function. Examples of pure functions include sqrt(), pow(), and stren ().
  • A pure function is a function or chunk of code that consistently produces the same result with the same set of arguments. Any state or data changes that take place while a programme is running are unrelated to it. Instead, it just depends on the input arguments.
  • Pure Functions, on the other hand, are streamlined, precise, clear-cut, safe, and easy to reuse. They won't affect anything external to their body because they have a pure purpose. You can use them with confidence because they accept input and provide output.

#SPJ2

Similar questions