How can you dynamically allocate memory in C?
Answers were Sorted based on User's Feedback
Answer / nashiinformaticssolutions
Memory can be dynamically allocated using functions like malloc(), calloc(), realloc(), and freed using free().
| Is This Answer Correct ? | 0 Yes | 0 No |
Memory can be dynamically allocated using functions like malloc(), calloc(), realloc(), and freed using free().
| Is This Answer Correct ? | 0 Yes | 0 No |
what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these
what is develop in c language
How many levels of pointers have?
write a program to print infinte number
Differentiate between new and malloc(), delete and free() ?
Why c is known as a mother language?
please can some one guide me, to the answer Write a C program to enter 15 numbers as an input from the keyboard and program will find and print odd numbers and their average. i have studied while and do while loop for loop if and else if switch
what is out put of the following code? #include class Base { Base() { cout<<"constructor base"; } ~Base() { cout<<"destructor base"; } } class Derived:public Base { Derived() { cout<<"constructor derived"; } ~Derived() { cout<<"destructor derived"; } } void main() { Base *var=new Derived(); delete var; }
What is the difference between a function and a method in c?
What are the different types of linkage exist in c?
What are dangling pointers in c?
a character variable can at a time store a) 1 character b) 8 characters c) 254 characters d) none of the above