12th Class Computer Chapter 6 Functions Short Questions Answer

12th Class Computer Chapter 6 Functions Short Questions Answer

What is the fundamental to programming in every language?

Dividing you program into manageable chunks of code is an idea that is fundamental to programming in every language.

What is the importance of function in “C” language?

A function is a basic building block in C language. C programs are made more flexible through the use of function.

Define a function.

A function is a program unit or module that is designed to perform some particular task.

Write down any two reasons for partitioning your programs?

First, makes programs much easier to read and to manage. Second, make functions the can be reused.

Write any one example of the benefits of reusing function?

Standard library is a good example of the benefits of reusing function.

Why are the functions written individually?

Individual functions are written to carry out each of the tasks defined in the analysis of the problem.

What is the benefit of independency of function?

Because the functions are independent of one another the programmer can write each function and test it without worrying about the details of other function.

Write some “C” library functions?

printf(), scanf(), stremp(), pow() and sqrt() are known as “C” library functions.

Define the Function declaration or prototype.

The function declaration also known as prototype is a statement that describes a function sufficiently for the compiler to be able to compile calls to it. It declares the name of the function its return type and the type of its parameters.

Explain “void main (void);”.

The first void before the function name means that this function does not return anything and the second void in the brackets means it has no arguments.

What do you say about the defining a function?

We specify what a function does in a function definition. There are two parts in the definition, first is the function header, which is the first line of the definition before the opening brace and the function body which lies between the braces.

What do you know about the function header?

A function is a program unit or module that is designed to perform some particular task.

What do you know about the Function body?

A function performs its computations by executing the statements in its body. The variables declared within the body of a function and all the functions parameters are local to the function. A variable is created at the point at which it is defined and ceases to exist at the end of the block containing it.

Write down the methods that we can use to return more than two values?

There are two methods that we can use to return more than two values one is using global variables and the second is specifying the values to be returned as arguments in the function.

Define a global variable?

A variable that is known to all the functions in a program.

You Can Learn and Gain more Knowledge through our Online Quiz and Testing system Just Search your desired Preparation subject at Gotest.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button