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

Tasks

This document outlines the instructions for Lab 4 of the Fundamentals of Programming course, which includes a series of programming tasks to be completed in three hours. Students are prohibited from communicating with each other during the lab and must show rough work for any questions. The tasks involve writing programs for number comparisons, string manipulations, and character counting.

Uploaded by

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

Tasks

This document outlines the instructions for Lab 4 of the Fundamentals of Programming course, which includes a series of programming tasks to be completed in three hours. Students are prohibited from communicating with each other during the lab and must show rough work for any questions. The tasks involve writing programs for number comparisons, string manipulations, and character counting.

Uploaded by

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

1st October 2025

Fundamentals of Programming
Lab 4
General Instructions (Read carefully)
All tasks listed below are to be solved in given three hours these tasks will be evaluated and
graded accordingly.
Students are not allowed to talk to each other, if you have any questions please raise your hand
and remain seated unless you are allowed to move. No query or question will be entertained
unless you have some rough work to show your logic.
If any students is found cheating / copying code from internet / copying code from another
student, them consequences can lead towards, F grade in this course.

1. Write a program that checks if a number is positive, zero,


or negative using comparison operators.

2. Write a program that compares two numbers and


displays which one is larger or if they are equal
(true/false).

3. Write a program that checks if a number is between 1


and 100 using logical AND operator.

4. Write a program that reads a full name with spaces using


getline() and displays its length.

5. Write a program that concatenates first name and last


name into a full name and displays its size.

Page 1 of 2
1st October 2025

6. Write a program that reads a sentence and displays the


number of characters in it.

7. Write a program that compares two strings and checks if


they are equal.

Page 2 of 2

You might also like