0% found this document useful (0 votes)
31 views2 pages

PF Lab Terminal SP2021

This document outlines a lab terminal for the Programming Fundamentals course at COMSATS University Islamabad, Attock Campus, for the BCE-2 Spring 2021 program. It includes three programming questions focusing on temperature record maintenance, a text language converter, and solving a system of equations using arrays and loops. The lab is scheduled for 2 hours and is worth a total of 50 marks.

Uploaded by

zaincms5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

PF Lab Terminal SP2021

This document outlines a lab terminal for the Programming Fundamentals course at COMSATS University Islamabad, Attock Campus, for the BCE-2 Spring 2021 program. It includes three programming questions focusing on temperature record maintenance, a text language converter, and solving a system of equations using arrays and loops. The lab is scheduled for 2 hours and is worth a total of 50 marks.

Uploaded by

zaincms5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

COMSATS University Islamabad

Attock Campus
Department of Electrical and Computer
Engineering

Program: BCE-2 Spring 2021

Lab Terminal
Course: Programming Fundamentals
Time Allowed: 2 hours
Marks: 50
Date: 25-06-2021

Name: ______________________________________ Reg. No:


_______________________________

Question 1: [CLO-1,3,4], marks[20]

Write a program for weekly temperature record maintenance in an


industrial area which stores temperature readings for each day of the
week. Record the temperature with the interval of 4hours.
Use a 2D array which stores number of days as rows and number of time
intervals as columns. Ask the user whether he wants to check highest or
lowest temperatures of the week. Display the results with their
corresponding day and time interval.

Question 2: [CLO-2,3],
marks[20]

Let suppose there is a text language converter which uses numeric


digits in place of certain alphabets in the speech e.g :

Normal speech: programming is an interesting subject


Text speech: 9R0GR44MM1NG 15 4N 1N73R35T1NG 5U8J3C7

Write a program for this converter which reads a message in normal


speech entered by user and converts it into text speech. The
converter should substitute following digits for letters: A->4 , B->8, E-
>3, I->1, O->0, P->9 , S->5, T->7 . Convert the message into upper
case letters using both built-in & user-defined function for converting
strings into upper case letters and compare the time complexity for
both cases.
Question 3: [CLO-2],
marks[10]
Consider the two equations below, write the code that find the

roots value of x & y .


x +10 y=5
−5 x+ 3 y=7
Using arrays and loops. Write the code for each intermediate step

such array declaration and initialization, adjoint of matrix,

determinant of matrix, inverse of matrix, and multiplication of

matrices.

You might also like