You are on page 1of 2

DIGITAL ASSIGNMENT-1

BCSE102L-WINTER SEM 2021-22

LAST DATE TO UPLOAD IN VTOP : 20.4.2022


Instructions
➢ For Each and every program the coding to be provided as text and
execution results as screenshot. For all the programming questions
below.
➢ The first two outputs to be displayed is the regno of you and name of
you for all the programming questions and then print the desired
outputs.
➢ If the text coding given and output is not matching marks will be
reduced suitably.
➢ Last submission will lead to reduction in marks.
➢ If the text code given is not matching the output when tested for
execution marks will be reduced suitably
1. Write a C program for Income Tax calculation of individual tax payer using conditions
and looping

Income tax slab rate FY 2020-21 (AY 2021-22)

Income Tax Slab Income Tax Slab Rates


Rs 0.0 – Rs 2.5 Lakhs NIL
Rs 2.5 lakhs- Rs 5.00 Lakhs 5%
Rs 5.00 lakhs- Rs 7.5 Lakhs 10%
Rs 7.5 lakhs – Rs 10.00 Lakhs 15%
> Rs 10 Lakhs 20%
Get the input of income of individual and calculate the final tax to be paid. For an example,
Sample input: 572000
Sample calculation:
i) 0-2.5 lakhs →0
ii) 2.5 to 5 lakhs → 5 % of 2.5 lakh
iii) 5 to 5.72 lakhs →10% of 72000
Finally display the tax amount to be paid.
2. Write a C program to get input of an array of integers and prepare another character
array which contains ASCII values of all of them respectively and form the results as
single character array and display the result.
3. Write a C program by performing dynamic memory allocation using pointers instead
of arrays and display the result for Question No.2. Also deallocate memory after
displaying the results.
4. Write a C program to find out the Hotel Room Rent bill for a customer stayed in a hotel
using conditional and looping statements. Get the input for room rent and calculate the
GST and print the total amount to be paid.

GST Rates for Hotels based on Room Tariff (with effect from 1st October 2019)
Tariff per Night GST Rate
< Rs.1,000 No Tax
Rs.1,001 -7,500 12%
= or > INR 7,501 18%
5. Write a C program to get input of two integer arrays separately and prepare a third
array which is sorted in ascending order contains the merger of both arrays in ascending
order.

6. Write a C program by performing dynamic memory allocation using pointers instead


of arrays and display the result for Question No.5. Also deallocate memory after
displaying the results.

7. Write a C program to find out the EB bill for a consumer using conditional and looping
statements.

0 to 100 units – free of cost.

0 to 200 units – first 100 units free, for balance Rs. 1.5 per unit.

For 0 to 500 units – first 100 units free, for next 100 Rs. 1.5 per unit, for next 201-500
for balance Rs.2.5 per unit

For above 500 units – Rs 3. per unit

Get the input of number of units consumed and print the bill amount.

8. Write a C program to collect an array of names as input and find out the number of
characters in each name and form a new integer array which will contain the length of
each name and display the result.
9. Write a C program by performing dynamic memory allocation using pointers instead
of arrays and display the result for Question No.8. Also deallocate memory after
displaying the results.

You might also like