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
Explain continue keyword in c
How pointers are declared?
What is line in c preprocessor?
What is the difference between break and continue?
When is a “switch” statement preferable over an “if” statement?
Why is c used in embedded systems?
Explain the advantages and disadvantages of macros.
which is conditional construct a) if statement b) switch statement c) while/for d) goto
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
In c programming, explain how do you insert quote characters (? And ?) Into the output screen?
Difference between constant pointer and pointer to a constant.
simple program of graphics and their output display
What is formal argument?
Why is sprintf unsafe?
How can I recover the file name given an open stream?