What is the maximum number of bytes that can be allocated using 'malloc' in C?
Select an option to see the answer and solution.
What is the difference between 'malloc' and 'calloc' in C?
Select an option to see the answer and solution.
In C, which function is used to allocate memory from the stack?
Select an option to see the answer and solution.
What happens if you attempt to free the same block of memory twice in C?
Select an option to see the answer and solution.
What is the primary advantage of using dynamic memory allocation in C?
Select an option to see the answer and solution.
Which function is used to allocate memory for a structure in C?
Select an option to see the answer and solution.
What is the difference between 'free' and 'delete' in C?
Select an option to see the answer and solution.
Which function is used to release all dynamically allocated memory in C?
Select an option to see the answer and solution.
In C, what is the purpose of the 'realloc' function?
Select an option to see the answer and solution.
What is a memory fragment in C?
Select an option to see the answer and solution.
The number of arguments for realloc() function is/are:
Select an option to see the answer and solution.
With every use of a memory allocation function, what function should be used to release allocated memory, which is no longer needed?
Select an option to see the answer and solution.
Array is preferred over linked list for the implementation of . . . . . . . .
Select an option to see the answer and solution.
The free() function frees the memory state pointed to by a pointer and returns . . . . . . . .
Select an option to see the answer and solution.
When the pointer is NULL, then the function realloc is equivalent to the function . . . . . . . .
Select an option to see the answer and solution.
What will be the output of the following C code if the input entered as first and second number is 5 and 6 respectively?
#include<stdio.h>
#include<stdlib.h>
main()
{
int *p;
p=(int*)calloc(3*sizeof(int));
printf("Enter first number\n");
scanf("%d",p);
printf("Enter second number\n");
scanf("%d",p+2);
printf("%d%d",*p,*(p+2));
free(p);
}
Select an option to see the answer and solution.
What will be the output of the following C code?
#include<stdio.h>
#include<stdlib.h>
void main()
{
char *p = calloc(100, 1);
p = "welcome";
printf("%s\n", p);
}
Select an option to see the answer and solution.
Which of the following is an example for non linear data type?
Select an option to see the answer and solution.
Local variables are stored in an area called . . . . . . . .
Select an option to see the answer and solution.
If the space in memory allocated by malloc is not sufficient, then an allocation fails and returns . . . . . . . .
Select an option to see the answer and solution.