Answer Posted / suman halder
1.we can apply "call by reference" mechanism within the
function so that multiple values get returned..
2.if the return types are homogeneous..i.e if we wanna return more than one integer values or more than one characters or any other type,then we can use an array to do that job for us as C provides various ways to return array from a function ..
*** if u try to return more than one value at a time through return statement ,last value will be returned and
all other values are ignored..
e.g
return 10,20,30;
it will only return 30
so,the most convenient way to do this is to use "call by reference" mechanism..
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is huge pointer in c?
What is a pointer and how it is initialized?
Which function in C can be used to append a string to another string?
What is the difference between declaring a variable and defining a variable?
Which header file is used for clrscr?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
How reliable are floating-point comparisons?
how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12
Write a code to generate divisors of an integer?
Compare and contrast compilers from interpreters.
Is it better to bitshift a value than to multiply by 2?
What is a null pointer in c?
What is assert and when would I use it?
Study the following C program :call_me (myvar)int myvar;{ myvar +- 5; }main(){int myvar;myvar = 3;call_me(myvar);printf("%d ",myvar);What will be printed a) 3 b) 5 c) 8 d) symbol