How can I allocate arrays or structures bigger than 64K?
Answer Posted / dinakarangct
#include<stdio.h>
struct stud {
int i,j,k;
struct stud *next,*prev;
}**ptr;
void main(){
int i;
ptr= ( struct stud **)malloc(sizeof(struct stud*)*6400 );
for(i=0;i<6400;i++)
ptr[i]= ( struct stud *)malloc(sizeof(struct stud)*10 );
}
Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What is return type in c?
In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping
How is null defined in c?
Why calloc is better than malloc?
What does s c mean on snapchat?
What are the disadvantages of a shell structure?
What is atoi and atof in c?
Are there namespaces in c?
What is the equivalent code of the following statement in WHILE LOOP format?
Why doesnt long int work?
What is a method in c?
What is the difference between declaring a variable by constant keyword and #define ing that variable?
What is c preprocessor mean?
What is %d used for?
What is a protocol in c?