You are on page 1of 3

C assignment

BCA Ist sem. (Agra)


1 The distance between two cities (in k.m.) is input through key board .WAP to convert and print this distance
in meter, feet, inches and centimeters.

2 If the marks obtained by a student in five different subject are input the keyboard.

3WAP to find out the aggregate marks, percentage marks and division obtained by the student. Assume that
the maximum marks that can be obtained by a student in each subject is 100.

4 WAP to convert the temperature of any city (entered in Fahrenheit degrees) into centigrade degrees.

5 If a five digit number is inputted through keyboard, WAP to calculate the sum of its digits.

6 If a five digit number is inputted through keyboard, WAP to print reverse of this number.
7 Admission to a professional course is subject to the following conditions:
Marks in Maths >= 60
Marks in Physics >= 50
Marks in Chemistry >= 40
Total marks in all three subject >= 200
Or
Total marks in Maths and Physics >= 150
Given the marks in three subjects, WAP to process the application to list the eligible candidates. The
program should end on user’s choice.
8 WAP using switch-case to check whether a given year is a leap year or not. Case-1 will include multiple
if statements, case-2 will use a single if statement having logical operators and case-3 will use ternary
operator(?:).
9 WAP to determine whether the character entered through keyboard is a capital letter, a small case letter, a
digit, or a special symbol.

10 WAP to print all the ASCII values and their equivalent character using a while loop. ASCII values vary
from 0 to 255.

11 WAP to print all prime numbers from 1 to 300.


.
12 WAP to generate all combinations of 1, 2, 3.

13 WAP to all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to
the number itself, then the number is called an Armstrong number.
For example, 153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 * 3).

14 WAP through function to calculate the factorial value of any integer entered through the keyboard.
15 WAP to obtain the sum of the following series using a function for n!. Here x and n will be entered through
the keyboard.
S = x + x2/2! + x3/3! + x4/4! + . . .
16 Two number are entered through keyboard. WAP through function power ( a, b ), to calculate the value of
a raised to b.
17 WAP program-to-find-smallest and largest numbers of any array.
18 WAP to reverse the any integer array.

19 Twenty-five numbers are entered from the keyboard into an array. Write a program to find out how many
of them are positive, how many are negative, how many are even and how many odd.

20 WAP using functions to perform the following tasks through switch-case control statement:
a) Transpose of a matrix
b) Addition of two matrices
c) Multiplication of two matrices of different orders with compatibility check
21WAP which will read a string and rewrite it in the alphabetical order. For e.g. the word STRING would be
written as GINRST.
22 WAP with the help of function that will scan a string passed as an argument and convert all lower-case
characters into their upper-case equivalents.

Index format

S.no. Program Page no. Date Signature


Lab Assignment
‘C’-Programming

B.C.A. Ist
Sem.
2010-11

Submitted To: Submitted By


Mr. Prashant Mishra Name:
Roll No.:
Student Sign.:

You might also like