Linked List – Arithmetic – Problem #5

IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive

Difficulty: medium

Problem Statement

Define a structure “node” to store a link list of integers. Write a function void make_list(node *l, int n) to read n integers and store them in a link list. Write a function int min_list(node *l) which takes as input a link list and returns the value of the smallest element of the link list. Write a main program to – Read an integer n. Then uses make_list function to read n integers and stores them in a list l. Call min_list function compute and then print the smallest element of list l. Example: Input: 1, 2, 3, 4, 5 Output: 1

Back to Lab Problems
Linked List/Arithmetic/Problem #5

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #5

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.