php mcq questions with answers
If a procedure fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this procedure?
A.fun(int i, Single j, double k) decimal
{ ... }B.static decimal fun(int i, Single j, double k)
{ ... }C.fun(int i, Single j, double k)
{
...
return decimal;
}D.static decimal fun(int i, Single j, double k) decimal
{ ... }E.A procedure can never return a value.
If a function fun() is to receive an int, a Single & a double and it is to return a decimal then which of the following is the correct way of defining this function?
A.decimal static fun(int i, Single j, double k)
{ ... }B.decimal fun(int i, Single j, double k)
{ ... }C.static decimal fun(int i, Single j, double k)
{ ... }D.static decimal fun(int i, Single j, double k) decimal
{ ... }E.static fun(int i, Single j, double k)
{
...
return decimal;
}
Which of the following statements are correct about functions used
in C#.NET?
- Function definitions cannot be nested.
- Functions can be called recursively.
- If we do not return a value from a function then a value -1 gets returned.
- To return the control from middle of a function exit function should be used.
- Function calls can be nested.
A.1, 2, 5B.2, 3, 5C.2, 3D.4, 5E.None of these
How many values is a function capable of returning?
A.1B.0C.Depends upon how many params arguments does it use.D.Any number of values.E.Depends upon how many ref arguments does it use.
How many values is a subroutine capable of returning?
A.Depends upon how many params arguments does it use.B.Any number of values.C.Depends upon how many ref arguments does it use.D.0E.1