CSE MCQs :: C-MCQs
- void * malloc(size_t n) returns:
- In function free(p), p is a:
-
What is the output of this C code?
void main()
{
char *p = calloc(100, 1);
p = "welcome";
printf("%s\n", p);
} - Memory allocation using malloc() is done in?
-
Why do we write (int *) before malloc?
int *ip = (int *)malloc(sizeof(int)); - Which one is used during memory deallocation in C?
- Which of the following will return a result most quickly for searching a given key?
- On freeing a dynamic memory, if the pointer value is not modified, then the pointer points to?