Computer Science, asked by MysticPetals, 1 year ago

Answer the following questions:
1)what is subroutine?
2)define function with respect to programming language?
3)characteristics of interface
4)why strlen is called pure function
5)side effects of impure function​

Answers

Answered by laraibmukhtar55
9

Subroutine:

In computer programming, a subroutine is program directives' sequence that act as an explicit task.

Function with respect to programming language:

A function is a block of planned, reusable code that is used to make a single, associated action.  

Characteristics of the interface:

Decent interface design should be attractive. It means that the use of that interface is pleasant. The design should contain cool user-friendly features with the visual appeal.  

Why sterlin is called pure function:

A function is called pure function if it always returns a similar result for the same argument values and it has no side effects like adjusting an argument as sterln returns the same result for the same argument so it is called pure function.

Side effects of impure function:

The side effect of the impure function is that it doesn't take any influences it doesn't return any value.

Answered by SnowyPríncess
5

Answer:

1) what is subroutine?

ans ) In computer programming, a subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.

2)Define function with respect to programming language?

Ans ) A function is a block of organized, reusable code that is used to perform a single, related action. Different programming languages name them differently, for example, functions, methods, sub-routines, procedures, etc.

3) characteristics of interface

ans ) Lets take a closer look at each.

Clear. Clarity is the most important element of user interface design.

Concise. Clarity in a user interface is great, however, you should be careful not to fall into the trap of over-clarifying.

Familiar.

Responsive.

Consistent.

Attractive.

Efficient.

Forgiving.

4)why strlen is called pure function

ans) Pure and impure functional programming

A pure function is one without any side-effects. A side-effect really means that the function keeps some sort of hidden state inside it. strlen is a good example of a pure function in C. If you call strlen with the same string, it always returns the same length.

5) What is the side effect of impure function?

ans ) A good sign that our function us impure (has side effect) is that it doesn't take any arguments it doesn't return any value.

I need ur help please help me inbox me really I NEED UR HELP

Similar questions