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 sizeof int?
Can a variable be both constant and volatile?
What is an array in c?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
List a few unconditional control statement in c.
What is a volatile keyword in c?
What are comments and how do you insert it in a C program?
main() { printf("hello"); fork(); }
Can a file other than a .h file be included with #include?
What is mean by data types in c?
Explain what math functions are available for integers? For floating point?
How can type-insensitive macros be created?
What is the concatenation operator?
What are the disadvantages of external storage class?