Skip to main content

Most Important Question in C programming for Be.tech 1st years ( Beginners of c programming )

#  STUDY MATERIAL

 

If you are a student of computer and you wants to learn c programming. So welcome on guide for everything 

        I am Daksh Jangir and here some important question for c programming beginners and computer and science engineering students from  1st year to above . For these question you completely learn about c programming. 


HERE ARE THE QUESTIONS : -
LET'S START

1. Say Hello to World.

2. Calculate simple interest

3. Ramesh's basic salary is input through the keyboard. His dearness allowance is 40% of basic salary, and house rent allowance is 20% of basic salary. Write a program to calculate his gross salary.

4. The distance between two cities (in km.) is input through the keyboard. Write a program to convert and print this distance in meters, feet, inches and centimeters.

5. If the marks obtained by a student in five different subjects are input through the keyboard, find out the aggregate marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

6. Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees.

7. The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle.

8. Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.

9. If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits. (Hint: Use the modulus operator '%')

10.If a five-digit number is input through the keyboard, write a program to reverse the number.

11.If a four-digit number is input through the keyboard, write a program to obtain the sum of the first and last digit of this number.

12.In a town, the percentage of men is 52. The percentage of total literacy is 48. If total percentage of literate men is 35 of the total population, write a program to find the total number of illiterate men and women if the population of the town is 80,000.

13.A cashier has currency notes of denominations 1, 2, 5, 10, 50 and 100. If the amount to be withdrawn is input through the keyboard, find the total number of currency notes of each denomination the cashier will have to give to the withdrawer.

14.If the total selling price of 15 items and the total profit earned on them is input through the keyboard, write a program to find the cost price of one item.

15.Two variables a and b contain values 10 and 20. Write a program to interchange the ontents of a and b with using a third variable.

16.Two variables a and b contain values 10 and 20. Write a program to interchange the ontents of a and b without using a third variable.

17. Paper of size A0 has dimensions 1189mm x 841mm. Each subsequent size A(n) is defined as A(n-1) cut in half parallel to its shorter sides. Write a program to calculate and print paper sizes A0,A1,A2,A3,A4...A8 .
 
18. If a five-digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23502.

19. If lengths of three sides of a triangle are input through the keyboard, write a program to print area of the triangle.

20. Write a program to receive Cartesian co-ordinates(x,y) of a point and convert them into polar co-ordinates (r,q).   
---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

UP TO WEEK 4: Must perform Questions 21-33. Please mantain softcopy of your codes and prepare a Lab Record consisting these program by hand(no print out). 
//CONDITIONAL OR SWITCH CASE
---------------------------------------------------------------------------------------------------------------------------------------------


21. Any integer is input through the keyboard. Write a program to find out whether it is an odd number or even number.

22. If 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.

23. Any year is input through the keyboard. Write a program to determine whether the year is a leap year or not.

24.If a five-digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23402.

25.Write a program to round off an integer i to the next largest multiple of another integer j . For example, 256 days when rounded off to the next largest multiple divisible by a week results into 259.

26. Given three points (x1, y1), (x2, y2) and (x3, y3), write a program to check if all the three points fall on one straight line. 
y = mx + C here m is slope and can be calculated (Change in Y) / (Change in X).

27. Write a program to find the greatest of the three numbers entered through the keyboard.

28. A five-digit number is entered through the keyboard. Write a program to obtain the reversed number and to determine whether the original and reversed numbers are equal or not.

29. If the ages of Ram, Shyam and Ajay are input through the keyboard, write a program to determine the youngest of the three.

30. Write a program to check whether a triangle is valid or not, when the three angles of the triangle are entered through the keyboard. A triangle is valid if the sum of all the three angles is equal to 180 degrees.

31. Find the absolute value of a number entered through the keyboard.Like if value is -12.32 abs value is 12.32 and if value is -9 abs value is 9.
 
32. Given the length and breadth of a rectangle, write a program to find whether the area of the rectangle is greater than its perimeter. For example, the area of the rectangle with length = 5 and breadth = 4 is greater than its perimeter.

33. According to the Gregorian calendar, it was Monday on the date 01/01/1900. If any year is input through the keyboard write a program to find out what is the day on 1st January of this year.

---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

UP TO WEEK 5: Must perform Questions 34-48. Please mantain softcopy of your codes and prepare a Lab Record consisting these program by hand(no print out). 
//LOGICAL OPERATOR (&&,||,!)
---------------------------------------------------------------------------------------------------------------------------------------------

34. Write a program using conditional operators to determine whether a year entered through the keyboard is a leap year or not.

35. Write a program to find the greatest of the three numbers entered through the keyboard using conditional operators.

36. Any year is entered through the keyboard, write a program to determine whether the year is leap or not. Use the logical operators && and ||.

37. Any character is entered through the keyboard, write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol.

The following table shows the range of ASCII values for various characters.

Characters ASCII Values
A - Z 65 - 90
a - z 97 - 122
0 - 9 48 - 57

special symbols
0 - 47, 58 - 64, 91 - 96, 123 - 127

you can also use ASCII chart in Let us c book.

38. An Insurance company follows following rules to calculate premium.
(1) If a person's health is excellent and the person is between 25 and 35 years of age and lives in a city and is a male then the premium is Rs. 4 per thousand and his policy amount cannot exceed Rs. 2 lakhs.
(2) If a person satisfies all the above conditions except that the sex is female then the premium is Rs. 3 per thousand and her policy amount cannot exceed Rs. 1 lakh.
(3) If a person's health is poor and the person is between 25 and 35 years of age and lives in a village and is a male then the premium is Rs. 6 per thousand and his policy cannot exceed Rs. 10,000.
(4) In all other cases the person is not insured.

Write a program to output whether the person should be insured or not, his/her premium rate and maximum amount for which he/she can be insured.

39. A certain grade of steel is graded according to the following conditions:
(i) Hardness must be greater than 50
(ii) Carbon content must be less than 0.7
(iii) Tensile strength must be greater than 5600

The grades are as follows:
Grade is 10 if all three conditions are met
Grade is 9 if conditions (i) and (ii) are met
Grade is 8 if conditions (ii) and (iii) are met
Grade is 7 if conditions (i) and (iii) are met
Grade is 6 if only one condition is met
Grade is 5 if none of the conditions are met

Write a program, which will require the user to give values of hardness, carbon content and tensile strength of the steel
under consideration and output the grade of the steel.

40. A library charges a fine for every book returned late. For first 5 days the fine is 50 paise per day, for 6-10 days fine is one rupee per day and
above 10 days fine is 5 rupees per day. If you return the book after 30 days your membership will be cancelled. Write a program to accept the number of days the member is late to return the book and display the fine or the appropriate message.

41. If the three sides of a triangle are entered through the keyboard, write a program to check whether the triangle is valid or not. The triangle is valid if the sum of two sides is greater than the largest of the three sides. 

42. If the three sides of a triangle are entered through the keyboard, write a program to check whether the triangle is isosceles, equilateral, scalene or right angled triangle.

43. In a company, worker efficiency is determined on the basis of the time required for a worker to complete a particular job. If
the time taken by the worker is between 2 & 3 hours, then the worker is said to be highly efficient. If the time required by the worker is between 3 & 4 hours, then the worker is ordered to improve speed. If the time taken is between 4 & 5 hours, the worker is given training to improve his speed, and if the time taken by the worker is more than 5 hours, then the worker has to leave the company. If the time taken by the worker is input through the keyboard, find the efficiency of the worker.

44. A university has the following rules for a student to qualify for a degree with A as the main subject and B as the subsidiary subject:
(a) He should get 55 percent or more in A and 45 percent or more in B.
(b) If he gets less than 55 percent in A he should get 55 percent or more in B. However, he should get at least 45 percent in A.
(c) If he gets less than 45 percent in B and 65 percent or more in A he is allowed to reappear in an examination in B to qualify.
(d) In all other cases he is declared to have failed.

Write a program to receive marks in A and B and Output whether the student has passed, failed or is allowed to reappear in B.

45. The policy followed by a company to process customer orders is given by the following rules:
(a) If a customer order is less than or equal to that in stock and has credit is OK, supply has requirement.
(b) If has credit is not OK do not supply. Send him intimation.
(c) If has credit is Ok but the item in stock is less than has order, supply what is in stock. Intimate to him data the balance will be shipped.

Write a C program to implement the company policy.

46. Using conditional operators determine:
(1) Whether the character entered through the keyboard is a lower case alphabet or not.
(2) Whether a character entered through the keyboard is a special symbol or not.
  

47. write a program to decide division of a student as following rules.
(1) There are 5 paper in each semester
(2) Maximum marks may vary for each paper
(3) if below then 40% for any two paper result is fail.
(4) if below then 40% for any paper result paper due.
(5) if total % below 33% result fail.
(6) if total % between 33% to 45% result third division.
(7) if total % between 45% to 60% result second division.
(8) if total % between 60% to 70% result first division.
(9) if total % above 70% result PASS WITH HONS.  


48. Write a program which to find the grace marks for a student using switch. The user should enter the class obtained by the student and the number of subjects he has failed in.
   - If the student gets first class and the number of subjects he failed in is greater than 3, then he does not get any grace.If the number of subjects he failed in is less than or equal to 3 then the grace is of 5 marks per subject.
   - If the student gets second class and the number of subjects he failed in is greater than 2, then he does not get any grace. If the number of subjects he failed in is less than or equal to 2 then the grace is of 4 marks per subject.
   - If the student gets third class and the number of subjects he failed in is greater than 1, then he does not get any grace. If the number of subjects he failed in is equal to 1 then the grace is of 5 marks per subject 


---------------------------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------------------------------------------------------------

UP TO WEEK 6: Must perform Questions 49-68. Please mantain softcopy of your codes and prepare a Lab Record consisting these program by hand(no print out).
//ITRATIVE STATEMENT (for, while, do-while) 
---------------------------------------------------------------------------------------------------------------------------------------------

49. let the equation x + y = r represents a circle with centre at origin and radius r. Write a program that reads r from the keyboard and prints the number of points with integer coordinates that lie within the circle.

50. Write a program that, for all positive integers i, j , k, and l from 1 through 1000, finds and prints all combinations of i, j , k, and I such that i + j + k = l and i < j < k < l.

➤HOPE THESE QUESTION ARE HELPFUL FOR YOU.

➤IF YOU WANTS ANS FOR THESE ALL QUESTION THEN MAKE  A COMMENT.

➤IF YOU WANTS MORE QUESTION OR PART -2 OF THIS ARTICLE THEN COMMENT .


THANK YOU  


Comments

Post a Comment

Popular posts from this blog

Pubg mobile ban in India???

Pubg mobile ban in India?          Well we know that pubg is a South Korea company, and pubg participate with a Chinese company named tencent and made a new game pubg mobile. So pubg mobile is not a completely Chinese app. Pubg mobile is not ban in India   Yes this is right and all pubg lovers is happy to see that pubg changed his privacy policy for india according to Indian government       Open your pubg and you will  get a notification.  This notification you receive.  And one more news that is not completely sure that pubg mobile changes his tencent logo.  Why Pubg mobile is not ban??  Why why  why❓ parents said  Well pubg is a not violence app just like tiktok and other Chinese app. Pubg mobile is a game. Pubg is a South Korean game , that means this is not completely Chinese app.        Second reason pubg mobile 25 % people play in India ,Pubg ( who...

ATTITUDE will change [ Story of Sylvester Stallone ][ Never giver up ][best motivation story]

ATTITUDE will change  : Story of  Sylvester Stallone The story begins. Since 1970, the hero of our story lived in America and wanted to become an actor with that power, but things were not going the way he wanted. He was absolutely a pauper. He could not do it on his wife. She used to have quarrels with him because she wanted the man to do a job but he did not want to because he knew that once he started getting paid, he would start living like a common man. He believed that even though road will live on.        But like the rest of the others, he will not be a slave to salary. He is trying to make his acting career with his best friend, his dog and Butkus went by train to Los Angeles. Los Angeles is the biggest studio in Hollywood so there are different studios He could go and give several daily auditions in a day because he cannot taxi again and again to go to so many, but he was rejected from many studios every day, no one was ready to keep ...

Cryptocurrencies and blockchain technology

 Cryptocurrencies and blockchain technology  Both blockchain technology and cryptocurrencies are altering how we perform financial transactions and interact with digital assets. They are closely related. Included below is a quick summary: Cryptocurrencies Digital or virtual tokens known as cryptocurrencies use cryptography to safeguard their transactions and limit the creation of new units. They are decentralised, which means that no single body or organisation, like as a bank, has power over them. Instead, they keep a record of all transactions and validate transactions via a peer-to-peer network. Litecoin, Ethereum, and Bitcoin are some examples of well-known cryptocurrencies.  blockchain technology The technology that underlies cryptocurrency is called blockchain technology. It is a distributed, decentralised ledger that securely and impenetrably records every transaction. A cryptographic hash of the preceding block is included in every block in the chain, creating a c...