Dynmic Memory "A4" 1 / 50 Heap memory global क्यों नहीं होती? Slow Controlled by pointer Compiler Syntax 2 / 50 Dynamic memory misuse का common result? Crash Data corruption Security bug All 3 / 50 Memory pool क्या है? Static memory Pre-allocated heap Stack Cache 4 / 50 free() memory तुरंत OS को लौटाता है? Yes Compiler dependent Sometimes No 5 / 50 Dynamic memory slow क्यों होती है stack से? Cache Compiler Heap managemen t Disk 6 / 50 malloc() failure common reason? Syntax Memory exhaustion Pointer Loop 7 / 50 realloc(ptr, size) में ptr NULL हो तो? Error malloc call free Crash 8 / 50 realloc(NULL, size) का effect? Error malloc जैसा free Ignore 9 / 50 realloc(NULL, size) का effect? Error malloc जैसा free Ignore 10 / 50 calloc() parameters का order? size, count count, size pointer, size bytes, block 11 / 50 malloc() thread safe है? Yes Depends OS Always No 12 / 50 Heap overflow क्या है? Stack full Heap corruption Memory leak Cache full 13 / 50 Memory leak detect करने का tool? printf debugger valgrind compiler 14 / 50 Dynamic memory pointer arithmetic क्यों risky है? Syntax Undefined behavior Slow Error 15 / 50 malloc() alignment कौन handle करता है? Programmer OS Compiler Library 16 / 50 realloc() कब new memory allocate करता है? Size कम Size ज्यादा और space न हो Size same ways 17 / 50 realloc() में old data का क्या होता है? Delete Lost Preserve Garbage 18 / 50 Best practice क्या है free() के बाद? Pointer reuse Pointer NULL assign realloc call Nothing 19 / 50 free() pointer को NULL बनाता है? Compiler dependent Yes No Sometimes 20 / 50 malloc() से allocate memory कहाँ store होती है? Stack Heap Register Cache 21 / 50 calloc() किस type की memory देता है? Garbage Initialized Static Read-only 22 / 50 realloc(ptr, 0) का effect? Error Free memory Ignore Resize 23 / 50 malloc() में sizeof क्यों जरूरी है? Speed Portabilit Memory correct size Syntax 24 / 50 Dynamic array बनाने का सही तरीका? int a[10]; int *a = malloc(); int *a = malloc(sizeof(int)*10); int a = malloc(10); 25 / 50 realloc() से pointer invalid कब होता है? Success Failure Size same NULL pass 26 / 50 calloc() malloc से slow क्यों है? Loop Zero initialization Size Pointer 27 / 50 Heap fragmentation क्या है? Memory waste Memory corruption Memory split All 28 / 50 malloc() किस level का function है? OS Library Compiler Hardware 29 / 50 Double free का परिणाम? Safe Undefined behavior Compile error Warning 30 / 50 Double free क्या है? दो pointer free दो बार call realloc fail malloc fail 31 / 50 free(NULL) करने पर क्या होगा? Error Crash No effect Warning 32 / 50 Wild pointer कब बनता है? free के बाद Initialize न करने पर realloc के बाद calloc के बाद 33 / 50 Dangling pointer क्या होता है? NULL pointer Free memory को point करने वाला pointer Wild pointer Constant pointer 34 / 50 Dynamic memory leak कब होता है? malloc fail free न करने पर realloc use पर calloc use पर 35 / 50 malloc() और new में अंतर? (C vs C++) Syntax Constructor call Type safety 36 / 50 realloc() failure पर original memory का क्या होता है? Free हो जाती है Lost हो जाती है Safe रहती है NULL हो जाती है 37 / 50 calloc(n, size) में पहला parameter क्या दर्शाता है? Bytes Blocks Address Pointer 38 / 50 malloc(sizeof(int)10) का अर्थ? 10 bytes 10 integers 10 pointers 1 integer 39 / 50 Stack memory और heap memory में मुख्य अंतर? Speed Size Management All 40 / 50 Heap memory की lifetime कब तक होती है? Function end Program end free() call तक Block end 41 / 50 Dynamic memory runtime पर क्यों allocate की जाती है? Fast Flexibility Syntax Compiler 42 / 50 malloc() fail होने पर क्या return करता है? 0 EOF NULL -1 43 / 50 free() function का कार्य क्या है? Memory allocate Memory delete Memory release Memory resize 44 / 50 realloc() का मुख्य उद्देश्य क्या है? Memory free Memory resize Memory copy Memory lock 45 / 50 calloc() memory को किससे initialize करता है? 1 Garbage 0 NULL 46 / 50 calloc() और malloc() में मुख्य अंतर क्या है? Size Speed Initialization Syntax 47 / 50 malloc() memory initialize करता है? Yes No Partially Compiler dependent 48 / 50 malloc() function क्या return करता है? Integer void pointer char pointer NULL only 49 / 50 Dynamic memory allocation के लिए कौन-सी header file जरूरी है? stdio.h memory.h stdlib.h alloc.h 50 / 50 Dynamic memory allocation किस memory से होता है? Stack Heap Register Cache Your score isThe average score is 0% 0% Restart quiz