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


Please Help Members By Posting Answers For Below Questions

what are the facialities provided by you after the selection of the student.

1911


What is switch in c?

835


Why clrscr is used after variable declaration?

1306


What is const volatile variable in c?

768


How can I do peek and poke in c?

834


Explain what are header files and explain what are its uses in c programming?

858


Are pointers integer?

748


How do you list files in a directory?

790


What is meant by inheritance?

832


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

2933


How many levels deep can include files be nested?

854


Where static variables are stored in memory in c?

703


What is the best style for code layout in c?

818


Can you assign a different address to an array tag?

890


What are the 5 elements of structure?

803