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 use of gets and puts?
which type of aspect you want from the student.
What are local static variables?
What is the general form of a C program?
write a program using linked list in which each node consists of following information. Name[30] Branch Rollno Telephone no i) Write the program to add information of students in linked list
What is a static function in c?
What is meant by operator precedence?
What is time complexity c?
What is the difference between NULL and NUL?
Do you know pointer in c?
Is null always defined as 0(zero)?
Can math operations be performed on a void pointer?
When should volatile modifier be used?
What are the rules for identifiers in c?
what are bit fields in c?