Computer Sciences > GATE 2026 SET-1 > Linked Lists
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
Which one of the following options gives the correct replacements for the expressions E1 and E2?
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?
Correct : b
Similar Questions
Let LIST be a datatype for an implementation of linked list defined as follows:typedef struct list {int data;struct list *next;} LIST;Suppose a program has crea...
A palindrome is a word that reads the same forwards and backwards. In a game
of words, a player has the following two plates painted with letters.
From...
Which number does not belong in the series below?
2, 5, 10, 17, 26, 37, 50, 64
Total Unique Visitors
Loading......