how to return a multiple value from a function?

Answers were Sorted based on User's Feedback



how to return a multiple value from a function?..

Answer / tanish

Use an array
int [] funct1();

Is This Answer Correct ?    3 Yes 0 No

how to return a multiple value from a function?..

Answer / krishna

You will have to use a structure or an array and then return
a pointer to the structure/array.

Is This Answer Correct ?    3 Yes 3 No

Post New Answer

More C Code Interview Questions

void pascal f(int i,int j,int k) { printf(ā€œ%d %d %dā€,i, j, k); } void cdecl f(int i,int j,int k) { printf(ā€œ%d %d %dā€,i, j, k); } main() { int i=10; f(i++,i++,i++); printf(" %d\n",i); i=10; f(i++,i++,i++); printf(" %d",i); }

1 Answers  


int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too

1 Answers  


void main() { int i=5; printf("%d",i++ + ++i); }

3 Answers  


How to access command-line arguments?

4 Answers  


main() { char * strA; char * strB = I am OK; memcpy( strA, strB, 6); } a. Runtime error. b. I am OK c. Compile error d. I am O

4 Answers   HCL,






How to reverse a String without using C functions ?

33 Answers   Matrix, TCS, Wipro,


Write a program to receive an integer and find it's octal equivalent. How can i do with using while loop.

2 Answers  


main() { extern out; printf("%d", out); } int out=100;

1 Answers  


void main() { int c; c=printf("Hello world"); printf("\n%d",c); }

2 Answers  


How do you create a really large matrix (i.e. 3500x3500) in C without having the program crash? I can only reach up to 2500. It must have something to do with lack of memory. Please help!

1 Answers  


why java is platform independent?

13 Answers   Wipro,


how can i cast a char type array to an int type array

2 Answers  


Categories