Q1. Write a C program to print a string on the screen.
Q2. Write a C program to show the use of ‘char’ data type.
Q3. Write a C program to print the sum of two numbers.
Q4. Write a C program to read two values from user and print there sum.
Q6. Write a C program to show the use of chain assignment.
Q7. Write a C program to show the use logical operator.
Q8. Write a C program to show the use of addition C shorthand operator.
Q9. Write a C program to show the use of subtraction C shorthand operator.
Q10. Write a C program to show the use of multiply C shorthand operator.
Q11. Write a C program to show the use of division C shorthand operator.
Q12. Write a C program to show the use of modulus C shorthand operator.
Q13. Write a C program to make use of ternary operator/conditional operator.
Q14. Write a C program to make use of ternary operator/conditional operator.
Q16. Write a C program to input user’s age and display a message you can vote or cannot vote.
Q17. Write a C program to accept a character and determine whether it’s upper case or lower case.
Q18. Write a C program to accept a character and determine whether its number, alphabet or symbol.
Q19. Write a C program to accept a number and determine whether it is even or odd.
Q20. Write a C program to accept a number and if it is less than 10 then print its square value.
Q22. Write a C program to accept percentage and print division accordingly.
Q23. Write a C program to calculate the square of a number.
Q25. Write a program to display the following output using a single cout statement.
Q26. Write a C program to read values of w, x, y and z and display the value of P, where
Q27. Write a C program that reads temperature in Celsius and displays it in Fahrenheit.
Q28. Write a C program that displays on screen
Q30. Write a C program to generate the following table:
Use a single cout statement for output.
(Hint : Make use of \n and \t)
Q31. Write a C program that generates the following output:
Q32. Write a C program that accepts radius of a circle and prints its area.
Q33. Write a C program that accepts marks in 5 subjects and outputs average marks.
Data Handling
Q34. Write a C program to display ASCII code of a character and vice versa.
Q35. Write a C program (using a function) to accept a number and print its cube.
Q36. Write a C program to compute the area of a square. Make assumption on your own.
Q37. Write a C program to convert a given number of days into years, weeks and days.
Q38. Write a C program that accepts a character between a to j and prints next 4 characters.
For the next 200 units – 50 P per unit
Beyond 300 units – 60 P per unit.
All users are charged meter charge also which is R50/-.
Q41. Write a C program to read a number n and print n2, n3, n4 and n5.
Q42. Write a C program to find area of a triangle.
Q43. Write a C program to find whether a given number is even or odd.
Q45. Write a program to convert given inches into its equivalent yards, feet and inches.
(1 yard = 36 inches, 1 foot = 12 inches)
Q46. Write a program to read two numbers and print their quotient and remainder.
(Hint: Store escape sequence for backspace in an integer variable).
Q48. Write a C program to compute simple interest and compound interest.
(Hint: Store escape sequence for backspace in an integer variable).