Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 is the purpose of clrscr () printf () and getch ()?

1112


What does d mean?

1164


What is meant by int main ()?

1255


Differentiate fundamental data types and derived data types in C.

1086


Which one would you prefer - a macro or a function?

1132


How can I copy just a portion of a string?

1362


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2285


What is #define in c?

1106


How to write a code for reverse of string without using string functions?

2200


What is "Duff's Device"?

1221


All technical questions

2053


Which is not valid in C a) class aClass{public:int x;}; b) /* A comment */ c) char x=12;

1127


what type of questions arrive in interview over c programming?

2081


Why is C language being considered a middle level language?

1206


What will be your course of action for a push operation?

1154