C Programs Output
C Programs Output
Slip1_2. Create a structure employee (id, name, salary). Accept details of n employees and write a
menu driven program to perform the following operations. [25 Marks]
Search employee by id
Display all employees
Slip2
Slip 2_1 : Write a c program to accept radius from user and display
Slip 3
slip3_1. Write a C program to accept temperatures in Fahrenheit (F) and display it in Celsius(C)
slip3_2. Write a menu driven program to perform the following operations on strings using standard
library functions: [25 Marks]
Length of String 2. Copy String 3. Connect Two Strings 4. Compare two strings
Slip4
slip4_1. Write 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]
Slip4_2. Create a structure Student (id, name, marks). Accept details of n students and write a menu
driven program to perform the following operations. [25 Marks]
a) Search student by id
b) Display all students
Slip5
slip5_1. Write 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]
Slip5_2.Write 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]
Slip6
slip6_1. Write 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]
Slip6_2. Write a program to accept a string and then count the occurrences of a specific character of a
string. [25 Marks]
Slip7
slip7_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]
Slip8
slip8_1. A cashier has currency notes of denomination 1, 5 and 10. Write a C program to accept
the withdrawal amount from the user and display the total number of currency notes of
each denomination the cashier will have to give. [15 Marks]
Slip 9
slip9_1. Write a C program to accept a character from the user and check whether the character is a
vowel or consonant. [15 Marks]
Slip9_2. Write a program to accept two numbers as range and display multiplication table
of all numbers within that range. [25 Marks]
Slip 10
slip10_1. Write 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_2. Write a program, which accepts a number n and displays each digit in words.
Example: 6702 Output = Six-Seven-Zero-Two [25 Marks]
Slip11
slip11_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]
Slip11_2. Accept radius from the user and write a program having menu with the following
options and corresponding actions [25 Marks]
Options Actions
1. 1. Area of Circle Compute area of circle and print
2. Circumference of Circle Compute Circumference of circle and print
slip12_2. Accept two numbers from user and write a menu driven program to perform
the following operations [25 Marks]
1. swap the values of two variables
2. calculate arithmetic mean and harmonic mean of two numbers
Slip13
slip13_1. Write a C program to accept the value of n and display sum of all odd numbers
up to n. [15 Marks]
slip13_2. Write a program to accept a decimal number and convert it to binary, octal and
hexadecimal number. [25 Marks]
Slip14
slip14_1. Write a C program to check whether a input number is Armstrong number or not.
[15 Marks]
Slip14_2. Write a program to accept a number and count number of even, odd and zero digits
within that number. [25 Marks]
Slip15
slip15_1. Write a C program to check whether a input number is perfect number of not.
[15 Marks]
slip15_2. Write 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