Computer Science, asked by Himu1833, 8 months ago

Malloc मैमोरी फंक्शन का सिन्टेक्स लिखिए।

Answers

Answered by suchindraraut17
0

Answer:

malloc() एक function है , जिसका इस्तेमाल memory के एक block को dynamically allocate करने के लिए होता है|इसका फुल फॉर्म memory allocation होता है|

syntax :-

ptr=(cast_type*)malloc(byte_size);

example :-

ptr=(float*)malloc(90);

Answered by StaceeLichtenstein
0

pointer1 = (type-cast*) malloc(datatype );  is the  correct answer to the given question .

Explanation:

  • The malloc function are used for providing the memory at the run time The definition of the Malloc are stored in the stdlib.h header file.It provides the dynamic memory allocation in the c and c++ programming language .
  • The main advantage of malloc function it stooping the wastage of memory .
  • For example :

ptr 1= (int*) malloc(200 * sizeof(int));

It allocated the 200 size of memory in the run time .

Learn More :

  • brainly.in/question/12270061

Similar questions