Examveda

Which among the following is a typical declaration of an unrolled linked list in C?

A.

#define SIZE N                                                             
struct node 
{                                                                           
    int node_count;                                                     
    int arr[SIZE];                                              
    struct node *next;                              
};

B.

#define SIZE N                                                            
struct node 
{                                                                                                                              
    int arr[SIZE];                                              
    struct node *prev;      
    struct node *top;                        
};

C.

#define SIZE N                                                          
struct node 
{                                                                           
    int node_count;                                                                                           
    struct node *next;                              
};

D.

#define SIZE N                                                         
struct node 
{                                                                           
    int node_count;                                                     
    int arr[SIZE];                                                                           
};

Answer: Option A


This Question Belongs to Data Structure >> Linked Lists In Data Structures

Join The Discussion

Related Questions on Linked Lists in Data Structures

What is a circular linked list?

A. A list where each node points to the next

B. A list where the last node points to the first node

C. A list where each node points to itself

D. A list where the nodes are in a circle