July 6, 2021 in C and CPP
Write a program to check whether the given string is palindrome or not.
a) Write a program to check whether the given string is palindrome or not.
July 6, 2021 in C and CPP
a) Write a program to check whether the given string is palindrome or not.
July 6, 2021 in C and CPP
c) Write a program to read 10 integers in an array and print them in reverse order.
July 6, 2021 in C and CPP
b) Write a program to create a link list of student records. The program reads the roll no
and name of the student and adds a node at the end of the list. It stops when a negative
roll no is entered by the user.
July 6, 2021 in C and CPP
a) Define a structure Measure having members feet and inch as integer. Write a
program to add two variables and store it in third variable of the same type. Print the
answer in the format: 5’6’’ + 3’9” = 9’3”. (Note that the valid answer is 9’3” and
not 8’15”).
July 6, 2021 in C and CPP
c) Write a program that calculates the net salary using entered basic salary.
Here, D.A.=27%, H.R.A.=10%, P.F.=12% of basic salary; and
M.A.=Rs.100, T.A.=Rs.1600 are fixed and I.T.=Rs.1000.
Net salary = basic salary + (DA+HRA+MA+TA)-(PF+IT)
A program should print the output in the following format only:
ENTER BASIC SALARY (in Rs.) =40000
ALLOWANCES:
D.A. =10800.00
H.R.A. = 4000.00
M.A. = 100.00
T.A. = 1600.00
DEDUCTION:
P.F. = 4800.00
I.T. = 1000.00
--------------------------------------------
NET SALARY = 50700.00
July 6, 2021 in C and CPP
b) Write a program to print all multiples of p up to number n. Both p and n are positive
integers input by the user.
July 6, 2021 in C and CPP
a) How is an array passed as an argument to a user-defined function? Explain with
suitable example.
July 6, 2021 in C and CPP
b) Differentiate between structure and union.
c) What is pointer? Explain scale factor of a pointer using example.
July 6, 2021 in C and CPP
a) Write a program that takes a positive integer as input. If input is negative print
appropriate message and prompt the user to enter positive number until correct input is
received. For positive number, print its individual digit in words. For example, if input is 2694 then output should be: “Two Six Nine Four”.
July 6, 2021 in C and CPP
c) Draw a flow chart to find largest number from the three numbers.