Question: SET B Write a program to display the output of the following pattern a ) b ) a 1 , 2 b c d 3
SET B
Write a program to display the output of the following pattern
a
b
a
b c d
up to rows
Convert the following Decimals into Octal and
Hexadecimal
ii
ii
c
iii
Add Subtract the following using their binary values
ii
iii
Write a program to read a line of text, two character and remove the all the occurrence of Ch in it
Example:
Input: Computer is an electronic device e
Output :Computzr is an zlzctronicdzvicz
Write a program to remove all the duplicates in a String S
In preparing the Invoice Bills, the customers are divided into three categories as Regular, Frequent and Rare. To calculate bill for the customers, the following conditions are applied:
For Regular,
If the bill Amount is between to
Discount Bill Amount
If the bill Amount is between to
Discount Bill Amount
If the bill Amount is between to
Discount Bill Amount
Above, Discount Bill Amount
For Frequent,
If the bill Amount is between to
Discount Bill Amount
If the bill Amount is between to
Discount Bill Amount
If the bill Amount is between to
Discount Bill Amount
Above, Discount Bill Amount
For Rare,
If the bill Amount is between to
Discount Bill Amount
If the bill Amount is between to Discount Bill Amount
Above, Discount Bill Amount
Additional Tax Bill Amount
Write a C Program to read the type of the customer String Bill Amount and to calculate the Revised Bill amount for the Customer after deducting the bonus
Write a C Program to
a Create a function getData that takes a number n as input and gets n integers from the user. The getData function also checks if the given input is odd or even. mark
b If the input number is even pass the even number to a function called evenSum which gets the input from the getData function and finds the sum of all the even numbers. mark
c If the input number is odd pass the odd number to a function called oddSum which gets the input from the getData function and finds the sum of all the odd numbers. mark
d Demonstrate the functions by calling getData and printing the values oddsum and evensum in the main function. marks
Hint: Use static variables oddsum and evensum to keep track of the odd and even sums.
Write a C Program that takes the category of the employee and salary from the user and finds the bonus depending on category using Switch case statement. The conditions to calculate bonus are as follows:
if empcategory if salary bonus of salary
else bonus of salary
if empcategory if salary bonus of salary
else bonus of salary
if empcategory if salary bonus of salary
else bonus of salary
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
