You are on page 1of 2

LOVELY PROFESSIONAL UNIVERSITY

HOME WORK: #4

School: Department:

Name of the faculty member: Course No:


CSE101

Course Title: Foundations of Computing

Class: Term: Section: Batch:

Part-A

Q1. Write a C program that will allow a person to generate the tickets of bingo
game in the form of m × n matrix with the following features:

a. All the numbers in the ticket should come in the range entered by the user
as the minimum range as well as the maximum range {Use local
variables}.

b. Either row wise or columns wise the sum should not exceed the maximum
range.

c. All numbers generated in the ticket should be unique.

d. User can enter the number of required tickets {Use Global variables}.

Q2. Suppose a file contains student’s records with each record containing name and
age of a student. Write a program to read these records and display them in sorted
order by name.

Q3. . Is it necessary that a file created in text mode must always be opened in text
mode for subsequent operations? What is the appropriate answer? Explain with
example.

Part-B

Q4. Write a C program to draft the system to automate the lab assessment
evaluations. There should not be any constraint of maximum lab evaluations,
whatever the number is, system should select n-2 lab assessments. All the lab
assessments should be from 10 with the following distribution (5 for Execution, 2 for
Written and 3 for Viva). At the end convert the sum of all the assessments
proportionate to its CA i.e. 30. The result should be printed in the tabular form in
the text file.

1
Q5. WAP that prompts the user to input name of a text file, read the text file &
output number of vowels and words in the text.

Q6. write a program to create another text file deleting the words “a”, “the”, “an”
and replacing each one of them with a blank space.

You might also like