how to return 1000 variables from functio9n in c?plz give me
code also

Answer Posted / y hussain reddy

#include<stdio.h>
void main()
{
int *a;
a=(int*)malloc(200);
void f(int *);
f(a);

for(i=0;i<100;i++)
printf("%d ",a[i]);
}
void f(int *a)
{

int i;
for(i=0;i<100;i++)
a[i]=i;
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between scanf and fscanf?

873


What is #line?

818


What is new line escape sequence?

1021


What is conio h in c?

808


Write a program to generate random numbers in c?

852


using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1578


How is a pointer variable declared?

778


What is floating point constants?

888


Differentiate between functions getch() and getche().

803


What is break statement?

847


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1717


What is string constants?

879


What is the difference between the local variable and global variable in c?

725


What is use of pointer?

778


What are the types of variables in c?

771