Sunday, April 19, 2015

C Programming Sheet-1

CHECK OUT HERE AND FIND AMAZING STUFF HERE
        
    Topics Covered:-
1.    Variables and Data types
2.    Arithmetic and Compound Operators
3.    Increment and Decrement Operators

1.      If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggregate and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.
2.      Temperature of a city in Fahrenheit degrees his input through the keyboard. Write a program to convert this temperature into Centigrade degrees.
3.      If a four digit number is input through the keyboard, write a program to reverse the number.
4.      In a town, the percentage of men is 52.The percentage of total literacy is 48.If the total percentage of literate men is 35 out of the total population, write a program to calculate the total number of illiterate men and women. Total population of the town is 80,000.
5.      Write a program  to produce the following output :-

                                  i.            Initialize x to 10
                                ii.            Calculate y=x++. Output x and y
                              iii.            Calculate z=++x. Output x and z
                              iv.            Calculate a=x--. Output x and a
                                v.            Calculate b=--x. Output x and b
















Ø  Decision Control Structure

6.      While purchasing certain items, a discount of 10% is offered if the quantity purchased is more than 1000.If quantity and price per item are input through the keyboard, write a program to calculate the total expenses.
7.      In a company an employee is paid as below :-
8.      If his basic salary is less than Rs 1500, then HRA = 10% of basic salary and DA=90% of basic salary. If his salary is either equal to or above Rs 1500, then HRA=Rs500 and DA=98% of basic salary. If the employee’s salary is input through the keyboard write a program to find his gross salary.
9.      If the cost price and selling price of an item is input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
10.  Any year is input through the keyboard. Write a program to determine whether the year is a leap year or not.


No comments:

Post a Comment