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 |
how can be easily placed in TCS.
what is the difference b/w compiler and debugger?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
Write a program to print all permutations of a given string.
main() { static char *s[]={"black","white","yellow","voilet"}; char **ptr[]={s+3,s+2,s+1,s}, ***p; p=ptr; **++p; printf("%s",*--*++p+3); }
write a progrmm in c language take user interface generate table using for loop?
What do you understand by friend-functions? How are they used?
What is a lookup table in c?
What is structure padding ?
int main() { int i=1; switch(i) { case '1': printf("hello"); break; case 1: printf("Hi"); break; case 49: printf("Good Morning"); break; } return 0; }
What is the difference between a structure and a union?
Explain what?s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?