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
Define macros.
How do I get an accurate error status return from system on ms-dos?
Explain what are bus errors, memory faults, and core dumps?
What are the three constants used in c?
Is c easy to learn?
How arrays can be passed to a user defined function
What is sizeof in c?
What is static and auto variables in c?
What are the 4 types of programming language?
Create a registration form application by taking the details like username, address, phone number, email with password and confirm password (should be same as password).Ensure that the password is of 8 characters with only numbers and alphabets. Take such details for 3 users and display the details. While taking input password must appear as “****”.
Explain the properties of union.
Why is it usually a bad idea to use gets()? Suggest a workaround.
hi any body pls give me company name interview conduct "c" language only
What is d'n in c?
Write a code to generate a series where the next element is the sum of last k terms.