Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a linked list to store and display the elements.

Hard

Problem Statement

Create a linked list to store and display the elements.

Sample Input

elements = {5, 10, 15}

Sample Output

5 -> 10 -> 15

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
#include <stdio.h> #include <stdlib.h> struct Node { int data; struct Node *next; }; int main() { struct Node *head = NULL; // Logic to add elements and display the list return 0; }
Log in or sign up to run or submit your code.Log inSign up
Input
elements = {5, 10, 15}
Expected Output
5 -> 10 -> 15