You are on page 1of 2

Homework 1

CAP151: COMPUTING 1
DOA: ____________ DOS:

Part-A

Q1. Write a program which shows difference between Implicit


and Explicit Type Conversions?

Q2. Write a program to display the day of week according to the


day no. entered by the user.

Q3. Write a program to show the difference between while loop


and do while loop

Q4. Write a program to perform the calculator operations using


switch statement

Q5. Write a program to find the sum of reciprocals of first n


natural nos. using functions and passing arguments to the
functions.

Q6. Write a program to find sum of n natural numbers using


recursion.

Q7. Write a program to generate pattern:


1
0 1
1 01
0101
10101

Q8. Write a program to insert an element in an unsorted list (on


the specified location).

Q9. Write a program to calculate largest element in a matrix.


Q10. Write a program that will examine each character in a
character type array and write the ASCII equivalent of each
character. Size of the array is known in advance by the integer
variable n.

You might also like