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

In which language linux is written?

1214


Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given

3047


Is c object oriented?

958


How can I discover how many arguments a function was actually called with?

1055


A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference

1102


How can you read a directory in a C program?

1133


What is a program flowchart?

1177


What is I ++ in c programming?

1100


Where are c variables stored in memory?

1056


What happens if header file is included twice?

1131


What is a const pointer in c?

1119


What is cohesion and coupling in c?

1021


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1130


Why is main function so important?

1089


What does the error 'Null Pointer Assignment' mean and what causes this error?

1199