BCA (2018) C Programs slip Solutions
-
Slip 1 Q.1Write a C program to accept dimensions of a cylinder and display the
surface area and volume of cylinder. [15 Marks]
-
Slip 1 Q.2Create a structure employee (id, name, salary). Accept details of n
employees and write a menu driven program to perform the following
operations. [25 Marks]
a) Search employee by id
b) Display all employees
-
Slip 2 Q.1Write a C program to accept radius of a circle and display the area and
circumference of a circle. [15 Marks]
-
Slip 2 Q.2Write a program to calculate sum of following series up to n terms.
Sum=X+X2/2!+X3/3!+……
(Note: Write separate user defined function to calculate power and factorial) [25 Marks]
-
Slip 3 Q.1Write a C program to accept temperatures in Fahrenheit (F) and display
it in Celsius(C) and Kelvin (K) (Hint: C=5.0/9(F-32), K = C + 273.15)
[15 Marks]
-
Slip 3 Q.2Write a menu driven program to perform the following operations on
strings using standard library functions: 1. Length of String 2. Copy
String 3. Connect Two Strings 4. Compare two strings[25 Marks]
-
Slip 4 Q.1Write a C program to accept two numbers and print arithmetic and
harmonic mean of the two numbers (Hint: AM= (a+b)/2 ,HM = ab/(a+b))
[15 Marks]
-
Slip 4 Q.2Create a structure Student (id, name, marks). Accept details of n
students and write a menu driven program to perform the following
operations.
a) Search student by id
b) Display all students
[25 Marks]
-
Slip 5 Q.1Write a C program to accept dimensions length (l), breadth(b) and
height(h) of a cuboids and display surface area and volume (Hint :
surface area=2(lb+lh+bh ), volume=lbh ) [15 Marks]
-
Slip 5 Q.2Write a program which accepts a sentence from the user and alters it as
follows: Every space is replaced by *, case of all alphabets is
reversed, digits are replaced by ? [25 Marks]
-
Slip 6 Q.1Write a C Program to accept a character from the keyboard and display
its previous and next character in order. Ex. If character entered is
‘d’, display “The previous character is c”, “The next character is e”.
[15 Marks]
-
Slip 6 Q.2Write a program to accept a string and then count the occurrences of a
specific character of a string. [25 Marks]
-
Slip 7 Q.1 Write a C program to accept the x and y
coordinates of two points and compute the distance between the two
points.[15 Marks]
-
Slip 7 Q.2 Write a program to calculate Multiplication of
two matrices of order m*n[25 Marks]
-
Slip 9 Q.1 Write a C program to accept a character from
the user and check whether the character is a vowel or consonant.[15 Marks]
-
Slip 9 Q.2Write a program to accept two numbers as range and display
multiplication table of all numbers within that range. [25 Marks]
-
Slip10 Q.1Write a C program to accept the x and y coordinate of a point and find
the quadrant in which the point lies. [15 Marks]
-
Slip10 Q.2Write a program, which accepts a number n and displays each digit in
words. Example: 6702 Output = Six-Seven-Zero-Two [25 Marks]
-
Slip 11 Q.1 Write a C program to accept the cost price and
selling price from the user. Find out if the seller has made a profit or
loss and display how much profit or loss has been made.
[15 Marks]
-
Slip 11 Q.2Accept radius from the user and write a program having menu with the
following options and corresponding actions [25 Marks]
Options Actions 1. Area of Circle Compute area of circle and print 2. Circumference of Circle Compute Circumference of circle and print 3. Volume of Sphere Compute Volume of Sphere and print -
Slip12 Q.1Write a C program to calculate sum of digits of a given input number.
[15 Marks]
-
Slip12 Q.2Accept two numbers from user and write a menu driven program to perform
the following operations
1. swap the values of two variables
2. calculate arithmetic mean and harmonic mean of two numbers [25 Marks]
-
Slip 13 Q.1Write a C program to accept the value of n and display sum of all odd
numbers up to n. [15 Marks]
-
Slip 13 Q.2Write a program to accept a decimal number and convert it to binary,
octal and hexadecimal number. [25 Marks]
-
Slip 14 Q.1 Write a C program to check whether a input
number is Armstrong number or not. [15 Marks]
-
Slip 14 Q2. Write a program to accept a number and count
number of even, odd and zero digits within that number.
[25 Marks]
-
Slip 15 Q.1 Write a C program to check whether a input
number is perfect number of not. [15 Marks]
-
Slip 15 Q.2Write a program having a menu with the following options and
corresponding actions
[25 Marks]
Options Actions 1. Area of square Accept length ,Compute area of square and print 2. Area of Rectangle Accept length and breadth, Compute area of rectangle and print 3. Area of triangle Accept base and height , Compute area of triangle and print -
Slip 16 Q.1 Write a C program to calculate xy without
using standard library function. [15 Marks]
-
Slip 17 Q.1Write a C program to display multiplication table of a given input number
[15 Marks]
-
Slip 17 Q.2Write a menu driven program to perform the following operation on m*n
Matrix [25 Marks]
- Display transpose of a matrix
- Calculate sum of
all odd elements of matrix
[25 Marks]
-
Slip 18 Q.1Write a C program to generate following triangle up to n lines.
1 1 2 1 2 3
[15 Marks]
-
Slip 19 Q.1 Write a C program to generate following triangle up to n lines.
* * * * * * * * * *
[15 Marks]