C_Programming(1)
C_Programming(1)
C_Programming(1)
Page 1 of 3
13 Explain the following with example:- (14)
OR
14 Write a C program to input electricity units consumed and calculate the total (14)
electricity bill according to the given condition:
i) For first 50 units Rs. 0.50/unit
ii) For next 100 units Rs. 0.75/unit
iii) For next 100 units Rs. 1.20/unit
iv) For unit above 250 Rs. 1.50/unit and
v) An additional surcharge of 20% is added to the bill.
16 i) Write a program to print the sum of all odd numbers and even numbers (14)
separately in an array
ii) Write a program to read an n x m matrix and print the transpose of the matrix.
17 i) Create a structure of bank customer with customer details like customer (14)
name, customer id, customer account balance and type of account. Write a
function to read and print the details of a customer.
ii) Write a program to find the factorial of a given number using recursive and
non recursive methods
OR
18 i) Write a program to pass an integer array to a function and find the sum of the (14)
digits of all elements in the array
ii) Write a program to pass an string to a function and find the count of special
characters excluding ‘$’.
Page 2 of 3
19 Create two text files and write a program to add the contents of one file at the (14)
end of another file.
OR
i) Read a string
꧁__________________________________________________________________꧂
Page 3 of 3