1. Home
  2. GATE CS
  3. Programming and Data Stru...

Filters

Found 1 Question

Set Default
Exams
Years
Subjects
Topics

List of top Programming and Data Structures Questions on Linked Lists - Recursive Traversal and Base Case Design asked in GATE CS

Consider the following code snippet in C language that computes the number of nodes in a non-empty singly linked list pointed to by the pointer variable head.

struct node{
  int elt;
  struct node *next;
};

int getListSize (struct node *head)
{
  if( E1 ) return 1;
  return E2;
}

Which one of the following options gives the correct replacements for the expressions E1 and E2?
  • GATE CS - 2026
  • GATE CS
  • Programming and Data Structures
  • Linked Lists - Recursive Traversal and Base Case Design
contact us
terms & conditions
Privacy & Policy
© 2026 Patronum Web Private Limited