C-Dynamic Memory Allocation and Data Structure Questions and Answers
Practice ModeShowing 10 of 104 questions
Q51
I have implemented the queue with a linked list, keeping trck of a front pointer nd a rear pointer. Which of these pointers will change during tan insertion into a NONEMPTY queue?
Answer: Option C
Q52
Suppose top is called on a priority queue that has exactly two entries with equal priority. How is the return value of top selected ?
Answer: Option B
Q53
Find the output
void main ( )
{
int *p, *q, *r;
q=(int *) malloc (sizeof (int));
p=q-1
r=q+1;
*p=100;
*q=200;
*r=300;
p++;
printf ("%d %d %d", *p, *q, *r);
}
Answer: Option A
Q54
Which datastructure works to handle multiple request in a time sharing system for use of CPU time sheduling
Answer: Option B
Q55
Circular buffer concept in computer system is based on which data structure
Answer: Option A
Q56
Circular buffer concept in computer system is based on which data structure
Answer: Option A
Q57
Find the output
void main ( )
{
void *p;
p=malloc(2);
*p=(int) 100;
printf("%d", *p;
}
Answer: Option D
Q58
In the array version of the stack class (with a fixed-sized array), which operations require linea time for their worst-case behavior?
Answer: Option D
Q59
Find the output, if the input is 2c3
void main ( )
{
int *hi=25, *hello=4;
hi=(int*) malloc (sizeof (int));
scanf("%dc%d", &hi, &hello);
printf("%d %d", hi, hello);
}
Answer: Option C
Q60
For a queue built using an array and containg n elements, the value of frong and rear would be respectively
Answer: Option C