C-Dynamic Memory Allocation and Data Structure

C-Dynamic Memory Allocation and Data Structure
11. Linear as well as non-linear data structure is possible in
  • Singer linked list
  • Circular linked list
  • Double linked list
  • All the above
Show Answer
12. Stack is useful for implementing
  • Recursion
  • Breath first search
  • Both a and B
  • None of these
Show Answer
13. Which of the following is useful in implementing quick sort/
  • Stack
  • Queue
  • List
  • Set
Show Answer
14. If the memory allocation fails, then malloc()
returns

  • NULL
  • A positive value
  • A negative value
  • None of the these
Show Answer
15. State the incorrect statement.
  • A circular list doesn't have a natural first or last node.
  • It is always desirable to keep an extra node at the front of the list.
  • A stack can't be represented in memory using linear arrary.
  • All of the above
Show Answer
16. The default initial value of malloc () memory allocation is
  • Garbage
  • NULL
  • -1
  • None of these
Show Answer
17. Find the output
void main ( )
{
typedef struct
{
int info;
struct node *ad;
}node;
node *p,*q;
p=malloc(sizeof(node));
q=malloc(sizeof(node));
printf("%d %d", sizeof(p), sizeof(q));
}

  • 2 2
  • 4 4
  • dependsd on compiler
  • Compilation error
Show Answer
18. Find the output
void main ( )
{
printf('%d", sizeof(malloc(10)));
}

  • 2
  • 10
  • 20
  • None of these
Show Answer
19. Which is not true about queue/
  • it follows FIFO data structure.
  • In queue the insertion and deletion terminology are known as enqueue and dequeue.
  • Testing for underflow for circular queue is similar to that of a linear queue.
  • None of the above
Show Answer
20. Linked list are not suitable for implementing
  • Insertion sort
  • Binary search
  • Radix sort
  • Polynomial manipulation
Show Answer
Questions and Answers for Competitive Exams Various Entrance Test