Programming Fundamentals Lab Assignments: Arrays, Sorting, and Histograms, Exercises of C programming

Labs for programming fundamentals

Typology: Exercises

2018/2019

Uploaded on 06/16/2019

hafeez-ali
hafeez-ali 🇵🇰

3 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
pf3
pf4
pf5

Partial preview of the text

Download Programming Fundamentals Lab Assignments: Arrays, Sorting, and Histograms and more Exercises C programming in PDF only on Docsity!

Second Semester

Course Title:

Programming Fundamentals

Topic:

Lab Assignments

Submitted To:

Engr. Salman Arain

Submitted By:

Hafeez Ali

Roll.No:

18-ELE-

Reg.#:

2018-UET-NFC-FD-ELECT-

NFC Institute of Engineering&Fertilizer

Research Faisalabad

Department of Electrical Engineering

Lab.No.

MORE ON ARRAYS

(PASSING ARRAY TO FUNCTION AND SORTING)

Task#

Write a program to initialize 5 elements of arrays with initializer list (random numbers) in a list.

Input:

Output:

Task#

Write a program that reads numbers from an array and graph the information in the form of histogram. Each number will be printed, then bar consisting of asterisks (*) will be printed according to the given number.

Input:

Task#

Generate a 2 x 2 matrix using arrays. Also generate a 2 x 3 matrix in a separate program. The numbers inside a matrix can be random.

Input:

Output:

Task#

Initialize an array containing 25 numbers. Write a program to find total number of positive and negative numbers from the array.

Input:

Output: