Math, asked by rajankavi146, 1 year ago

If a function is defined as static, it means
1. The value returned by the function does not change
2. all the variable declared inside the function automatically will be assigned
initial value of zero
3. It should be called only within the same source code / program file.
4. None of the other choices as it is wrong to add static prefix to a function; If a function is defined as static, it means; 1. The value returned by the function does not change; 2. all the variable declared inside the function automatically will be assigned; initial value of zero; 3. It should be called only within the same source code / program file.; 4. None of the other choices as it is wrong to add static prefix to a function

Answers

Answered by assalterente
1

Answer:

Step-by-step explanation:

Since we want to know if a function is defined as static, then we need to think about the meaning of static, and it gives us a meaning of something that remains the same, without major difference.

Thus , we can conclude that the right answer to give is number 1, which says:

"The value returned by the function does not change".


prashilpa: This is wrong. It is a computer Science question.
Answered by prashilpa
0

Answer:

3. It should be called only within the same source code / program file.

Step-by-step explanation:

This is not Maths question. This is computer science question.

A static function is defined as below in a C program.

static int MatrixAddition(int a, int b);

Let us assume that above function takes 2 integers and adds them and returns a integer.

The static keyword before restricts the scope of the function within the same source code or program file.

If you want to access this function from another file, the static keyword restricts it.

This is mainly used in C/C++ programs to restrict the scope of the function to a source file.

The abstraction feature of object oriented language is normally achieved using static keyword.

Hence the answer is 3.

Similar questions