Array and Strings – Algebra – Problem #5

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

Difficulty: medium

Problem Statement

Write a C program to read the roll number (integer), age (integer) and marks of 20 students admitted to a department. Generate random roll numbers in the range [1000,2000], age in the range [15 to 25] and marks in the range [0,100] and populate the respective arrays.. Please use three one dimensional arrays for storing roll number, age, and mark. a. Display the roll number, ages, and marks of all students having the same age. b. Display the roll number, ages, and marks of all students having identical marks. C. Sort the students according to their roll numbers and display the details nicely formatted. For parts a,b,c make 3 seperate programs.

Back to Lab Problems
Array and Strings/Algebra/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.