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 are the facialities provided by you after the selection of the student.
What is switch in c?
Why clrscr is used after variable declaration?
What is const volatile variable in c?
How can I do peek and poke in c?
Explain what are header files and explain what are its uses in c programming?
Are pointers integer?
How do you list files in a directory?
What is meant by inheritance?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
How many levels deep can include files be nested?
Where static variables are stored in memory in c?
What is the best style for code layout in c?
Can you assign a different address to an array tag?
What are the 5 elements of structure?