how to return 1000 variables from functio9n in c?plz give me
code also
Answer Posted / vignesh1988i
SEE /... we cant return 1000 variables at a time ... using
call by value...... only call by reference can do it....
tat is. usage of pointers...... since it will change
directly in the address itself.... that's a specality...
#include<stdio.h>
#include<conio.h>
void fun(int *,int *,int *.............1000 int's );
void main()
{
int a1,b1,c1,d1,.............a1000;
fun(&a1,&a2,...... &a1000);
for(int i=0;i<1000;i++)
printf("\n %d",a1);
getch();
}
void fun(int *a1,int *b2,.......... 1000 ptr declarations)
{
*a1=1;
*a2=2
.
.
.
.
.
.
100th varaible =1000;
}
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is the purpose of clrscr () printf () and getch ()?
What does d mean?
What is meant by int main ()?
Differentiate fundamental data types and derived data types in C.
Which one would you prefer - a macro or a function?
How can I copy just a portion of a string?
write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays
What is #define in c?
How to write a code for reverse of string without using string functions?
What is "Duff's Device"?
All technical questions
Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;
what type of questions arrive in interview over c programming?
Why is C language being considered a middle level language?
What will be your course of action for a push operation?