C Programming
C Programming
a) C Variables b) C datatypes
Q. 4 Accept principal amount, rate of interest, and duration from the user. Display
Interest Amount and Total Amount (Principal + Interest).
Q. 5 Accept the salary of an employee from the user. Calculate the gross salary on
the following basis:
Basic HRA DA .
Q. 6 Accept any number from the user. Display whether the number is divisible by
100 or not.
Q. 7 Accept a month in digit from the user. Display the month in words. If number
is not between 1 and 12 display message “Invalid Month”. (Use ‘switch’)
a) 1 b) 1
12 22
123 333
1234 4444
12345 55555
Q. 10 Write a program to swap the values of two numbers. Do this using call by
reference method of function.
Q. 12 Accept any two strings from the user. Display whether both the strings are
equal or not. (do not use standard functions.)
Q. 13 Accept any string from the user. Convert case of the string to lower / upper
using pointers. (if entered string is in lower case convert it to uppercase and
vice versa.)
Q. 14 Accept any two numbers from the user. Using pointers swap the values two
numbers without using third variable.
Q. 15 Create a structure to store the employee number, name, department and basic
salary. Create a array of structure to accept and display the values of 10
employees.
Q. 16 Accept a file name from the user. Display the contents of the file. Also add the
entered string to the file.