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 calloc in c?
How can I manipulate strings of multibyte characters?
What is meant by gets in c?
What are dangling pointers in c?
List a few unconditional control statement in c.
a program that can input number of records and can view it again the record
Explain 'far' and 'near' pointers in c.
What is the default value of local and global variables in c?
What is use of bit field?
What is typedef?
Explain pointers in c programming?
What is difference between structure and union in c?
Why is c so important?
i have a written test for microland please give me test pattern
What are conditional operators in C?