What is the difference between realloc() and free()
Answer / nitin
The free subroutine frees a block of memory previously
allocated by the malloc subroutine. Undefined results occur if
the Pointer parameter is not a valid pointer. If the Pointer
parameter is a null value, no action will occur. The realloc
subroutine changes the size of the block of memory pointed to
by the Pointer parameter to the number of bytes specified by
the Size parameter and returns a new pointer to the block. The
pointer specified by the Pointer parameter must have been
created with the malloc, calloc, or realloc subroutines and
not been deallocated with the free or realloc subroutines.
Undefined results occur if the Pointer parameter is not a
valid pointer.
| Is This Answer Correct ? | 3 Yes | 0 No |
What is the use of parallelize in spark?
Write a code to reverse string seperated by spaces i/p str=India is my country o/p str=aidnI si ym yrtnuoc After writing code, optimize the code
Write a C program to count the number of email on text
The program to allow the characters from the input received and send this function to a function check if the characters between letters a to z is a function of y joins as the characters main and output to otherwise return to the original function of the y characters
What is p in text message?
6. Which of the Following is not defined in string.h? A)strspn() B)strerror() C)memchr() D)strod()
What are the advantage of c language?
#include<stdio.h> #include<conio.h> void main() { float a; clrscr(); a=0.5; if(a==0.5) printf("yes"); else printf("no"); getch(); }
what is the program to display your name in any color?
WAP to find that given no is small or capital
general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only
Design a program using an array that lists even numbers and odd numbers separately from the 12 numbers supplied by a user.