HI FRIENDS,
HERE YOU CAN GET SOME IMPORTANT QUESTIONS THAT ARE ASK IN ALL INTERVIEW AND VI-VA.
HERE I COVERED MANY TOPIC WITH DIFFERENT QUESTIONS. THESE QUESTIONS ARE FOR BEGINNER OR PROFESSIONALS.
INTERVIEW QUESTIONS ARE ON TOPIC THAT ARE COVERED IN THIS BLOG AREJAVA, C. C++, SOFTWARE TESTING, SOFTWARE ENGG, NETWORKING ETC.
What is realloc() and free()? What is difference between them?
void* realloc (void* ptr, size_t size) : This function is used to change the size of memory object pointed by address ptr to the size given by size. If ptr is a null pointer, then realloc will behave like malloc(). If the ptr is an invalid pointer, then defined behaviour may occur depending the implementation. Undefined behaviour may occur if the ptr has previously been deallocated by free(), or dealloc() or ptr do not match a pointer reaturned by an malloc(), calloc() or realloc().
void free (void* ptr) : This function is used to deallocate a block of memory that was allocated using malloc(), calloc() or realloc(). If ptr is null, this function does not doe anything.
What do you mean by persistent and non persistent objects?
[ This question may be asked in many ways during c++ interviews, like how to send an object to a remote computer or how to save the your program state across application retarts. All this is related to serialization.]
Persistent objects are the ones which we can be serialized and written to disk, or any other stream. So before stopping your application, you can serialize the object and on retstart you can deserialize it. [ Drawing applications usually use serializations.]
Objects that can not be serialized are called non persistent objects. [ Usually database objects are not serialized because connection and session will not be existing when you retstart the application. ]
SO DOWNLOAD INTERVIEW QUESTION FROM BELOW LINK.
BEST OF LUCK IN ADVANCE......GOD IS ALWAYS WITH YOU
IF yOU HAVE ANY STOCK OF QUESTION, THEN PLEASE SEND ME FOR OTHER HELPFUL STUDENTS.
THANK
HERE YOU CAN GET SOME IMPORTANT QUESTIONS THAT ARE ASK IN ALL INTERVIEW AND VI-VA.
HERE I COVERED MANY TOPIC WITH DIFFERENT QUESTIONS. THESE QUESTIONS ARE FOR BEGINNER OR PROFESSIONALS.
INTERVIEW QUESTIONS ARE ON TOPIC THAT ARE COVERED IN THIS BLOG AREJAVA, C. C++, SOFTWARE TESTING, SOFTWARE ENGG, NETWORKING ETC.
What is realloc() and free()? What is difference between them?
void* realloc (void* ptr, size_t size) : This function is used to change the size of memory object pointed by address ptr to the size given by size. If ptr is a null pointer, then realloc will behave like malloc(). If the ptr is an invalid pointer, then defined behaviour may occur depending the implementation. Undefined behaviour may occur if the ptr has previously been deallocated by free(), or dealloc() or ptr do not match a pointer reaturned by an malloc(), calloc() or realloc().
void free (void* ptr) : This function is used to deallocate a block of memory that was allocated using malloc(), calloc() or realloc(). If ptr is null, this function does not doe anything.
What do you mean by persistent and non persistent objects?
Persistent objects are the ones which we can be serialized and written to disk, or any other stream. So before stopping your application, you can serialize the object and on retstart you can deserialize it. [ Drawing applications usually use serializations.]
Objects that can not be serialized are called non persistent objects. [ Usually database objects are not serialized because connection and session will not be existing when you retstart the application. ]
FOR MORE GO BELOW LINK
BEST OF LUCK IN ADVANCE......GOD IS ALWAYS WITH YOU
IF yOU HAVE ANY STOCK OF QUESTION, THEN PLEASE SEND ME FOR OTHER HELPFUL STUDENTS.
THANK
0 comments:
Post a Comment