what are the various memory handling mechanisms in C ?
Answer Posted / santhi
thre are 3 memory handling mechanisms.they are
malloc,calloc,ralloc.
malloc:which allocates memory to a variable dynamically.
calloc:which allocates blocks of memory.
ralloc: which can be used to reallocation of memory incase
of unsufficient memory which is allocated earlier.
using "delete" we can free the memory allocated to a
variable.
Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What does 3 periods mean in texting?
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
Is it possible to execute code even after the program exits the main() function?
What is spark map function?
What are the restrictions of a modulus operator?
Why do we use static in c?
Why can't I perform arithmetic on a void* pointer?
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
Explain the process of converting a Tree into a Binary Tree.
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
The purpose of this exercise is to benchmark file writing and reading speed. This exercise is divided into two parts. a). Write a file character by character such that the total file size becomes approximately >10K. After writing close the file handler, open a new stream and read the file character by character. Record both times. Execute this exercise at least 4 times b). Create a buffer capable of storing 100 characters. Now after generating the characters, first store them in the buffer. Once the buffer is filled up, store all the elements in the file. Repeat the process until the total file size becomes approximately >10K.While reading read a while line, store it in buffer and once buffer gets filled up, display the whole buffer. Repeat the exercise at least 4 times with different size of buffer (50, 100, 150 …). Records the times. c). Do an analysis of the differences in times and submit it in class.