0% found this document useful (0 votes)
5 views

Assignment 1

This document outlines the instructions and objectives for Assignment #01 in Programming Fundamentals (COSC-1101), due on January 14, 2025. It includes rules for marking, such as penalties for late submissions and plagiarism, and specifies that the assignment must be submitted in softcopy format. The assignment consists of five programming tasks related to arrays, each worth two marks.
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)
5 views

Assignment 1

This document outlines the instructions and objectives for Assignment #01 in Programming Fundamentals (COSC-1101), due on January 14, 2025. It includes rules for marking, such as penalties for late submissions and plagiarism, and specifies that the assignment must be submitted in softcopy format. The assignment consists of five programming tasks related to arrays, each worth two marks.
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
You are on page 1/ 2

Programming Fundamental Total marks = 10

Due Date
(COSC-1101) 14th Jan, 2025
Assignment # 01

Please carefully read the following instructions before attempting assignment.


RULES FOR MARKING
It should be clear that your assignment would not get any credit if:
▪ The assignment is submitted after the due date.
▪ Strict action will be taken if submitted solution is copied from any other student.
You should give presentation on your assignment to justify the solution.

You should consult the recommended books to clarify your concepts as handouts are not
sufficient.

You are supposed to submit your assignment in Softcopy format at Google Classroom.

Objectives:

• Understand the concept of Arrays and Functions.

NOTE
If you find any mistake or confusion in assignment (Question statement), please consult
with me before the deadline. After the deadline no queries will be entertained in this
regard.

For Students

Student Name: ______________________ Student Roll #: ___________________

For Teacher

Marks: _______________________ Signature _________________________

Computer Science Department


Govt. Graduate College Khanpur
District Rahim Yar Khan
Questions No 01 Marks (02)

Write a program to find the largest and smallest elements in an array.


Example Input: {3, 5, 7, 2, 8}
Output: Largest: 8, Smallest: 2

Questions No 02 Marks (02)

Write a program to reverse the elements of an array.


Example Input: {1, 2, 3, 4, 5}
Output: {5, 4, 3, 2, 1}

Questions No 03 Marks (02)

Calculate the sum and average of all the elements in an array.


Example Input: {4, 6, 8, 10}
Output: Sum: 28, Average: 7

Questions No 04 Marks (02)

Write a program to find whether a given number exists in the array.


Example Input: Array: {10, 20, 30, 40}, Search: 30
Output: Found at position 3

Questions No 05 Marks (02)

Count how many times a specific number appears in an array.


Example Input: {1, 2, 3, 1, 4, 1}
Search: 1
Output: 3 times

You might also like