Tutorial Questions Of C

warningPlease try to solve these questions

Attempt all the questions

  1. Using the while loop; write the program to print the following series until the term value is less than 750. The series is 1, 2 ,5, 10, 17,……………………..
  2. Find the distance by using the following formula, D2 =(x2 –x1)2 + (y2 – y1)2 . Where x1, x2, y1, y2 are given by the user but should not equal to zero.
  3. Write a program to count and find the sum all the numbers in the array which are exactly divisible by 7 but not by 5.
  4. Write a program that adds the individual rows of a two dimensional array of m and n and store the sums of rows into a single dimensional array.
  5. Write a program to read an array of n elements. Find the largest and smallest number.
  6. Find the side of a triangle by using the formula s=Sqrt(a+ b-2ab cos(x)).
  7. Write the program that will obtain the length and width of a rectangle from the user and compute its area and perimeter.
  8. Write a program to read a four digit integer and print the sum of its digits.
  9. For a certain circuit with inductance L and resistance R, the damped natural frequency is given by, f=Sqrt(1/LC-R2 /4C2). It is desired to study the variation of this frequency with C(capacitance) where the program to calculate the frequency for different values of C starting from 0.01 to 0.1 in steps of 0.01.
  10. Write a menu driven program which has the following options

Factorial of a number

Prime or not

Odd or even

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *