Saturday, 27 July 2013

LIST OF QUESTIONS FOR PRACTICE OF PROGRAMMS OF C LANGUAGE

  • Write a program to calculate the area and circumference of a circle using the relation.         ( Area = πr2  ) and circumference = 2πr.
  • Write a program to find the grade obtained by the students of a class.
  • Write a program to calculate length of string.(with and without strlen())
  • Write a program to reverse a string. (with and with and without strlen()).
  • Write a program to convert string into lower case (with and without strlwr())
  • Write a program to convert string into upper case (with and without strupr()).
  • Write a program to copy a string into another char array ( with and without strcpy()).
  • Write a program to concatenate a string to another string (with and without strcat())
  • Write a program to compare two strings (with and without strcmp()).
  • Write a program that takes 5 strings from user, store them in two dimension char
  • array, now find the number of occurrence a specific character (entered by user) in          5 entered strings.
  • Write a program that takes 5 strings from user, store them in two dimension char. array, now display them in dictionary order.
  • Write a program to find number of vowels in a given string.
  • Write a program to count number of words in a given string.
  • Write a program to check whether a given string is palindrome or not.
  • Write a program to find the largest and the smallest from the given three integers.
  • Write a program to find sum, difference, product and quotient of any two integers as  per the choice of the user.
  • Write a program to find greater between two numbers.
  • Write a program to check whether a given number is positive, negative or zero.
  • Write a program to check whether a given number is even or odd.
  • Write a program to check whether a given number is a multiple of 5 or not.
  • Write a program to find greatest among 10 integers. Use array to store integers.
  • Write a program to find smallest among 20 integers. Use array to store integers.
  • Write a program to sort an array of 10 integers. Use bubble sort.
  • Write a program to sort an array of 10 integers. Use selection sort.
  • Write a menu driven program to demonstrate working of STACK. Define Push(),Pop() and View() functions to implement basic functionalities of STACK.
  • Write a program to calculate value of a determinant of third order.
  • Write a program to add two matrices of order 3x3 each.
  • Write a program to multiply matrices of order 3x3.
  • Write a program to calculate inverse of matrix of order 3x3.
  • Write a menu driven program to demonstrate working of QUEUE. Defineinsert(), delete() and View() functions to implement basic functionalities ofQUEUE.
  • Write a program to generate magic square.
  • Write a program to implement quick sort.
  • Write a program to find the greatest among three numbers (use if else)
  • Write a program to find the greatest among three numbers (use conditionaloperator)
  • Write a program to check whether a given year is a leap year or not.
  • Write a program that takes three digit number through keyboard and calculatesum of its digits.
  • Write a program to print your name without writing semicolon anywhere in the program.
  • Write a program to check nature of roots of a quadratic equation.
  • Write a program to check whether a given character is digit, alphabet or any special symbol.
  • Write a program to generate mark sheet of a student. User inputs marks of 5
  • subjects (assume that the maximum mark is 100). Student should be treated as pass if he is passed in all subjects. Your program should display three things a. Result: Pass or Fail b. Percentage (only if pass) c. Division: First, Second and Third
  • Write a program to print a chart showing the temperature in centigrade from 0° to 100° to with their corresponding values in Farenhiet, using while loop and using the relation  C / 5 = F-32 / 9
  • Write a program to print the square and cube of n natural numbers using while loop.
  • Write a program to check whether a given integer is even or odd or zero. The program should continue until a 0 is entered from the keyboard.
  • Write a program to solve a quadratic equation.
  • Write a program to prepare the pay bill for the employees of a company
  • Write a program to check prime and unprime numbers.
  • Write a program to print the Fibonacci series for any number of terms.
  • Write a program to calculate the interest and total amount to be paid by entering the amount of loan and the number of years, either by simple interest method or by compound interest method as per the choice of the user.
  • Write a program to calculate the LCM and HCF of any set of positive integers.
  • Write a program to delete any element from any array.
  • Write a program to copy the value of one string variable to another variable.
  • Write a program to concatenate two strings.
  • Write a program to check whether any given word is a palindrome or not.
  • A company maintains the record of their employees as : Name, designation , Details of the pay like Gross pay, Provident Fund deductions, Professional tax and the Net pay. Keep the details of the pay within a separate structure
  • Accept ten names and print the given names in opposite order using array of pointers.
  • A program to search data from any array.
  • A program of selection sort , Bubble sort, Quick sort To find the product of two matrices.
  • Write a program that displays your name on the screen
  • Write a program to display your name on first line and surname on the second line.
  • Write a program that declares three variables of int type and assign any values to them. Display values of these variables.
  • Write a program to add three numbers. Numbers are entered through keyboard.
  • Write a program to calculate simple interest.
  • Write a program to calculate square of a number.
  • Write a program to swap two integers.
  • Write a program to swap two integers without using third variable.
  • Write a program to calculate area of a circle.
  • Write a program to calculate area of triangle whose lengths of sides are given.
  • Write a program that displays your name on the screen until you press a key.
  • Once you pressed a key your name erased and your surname gets printed.
  • Write a program that takes one character from keyboard and display its ASCII code.
  • Write a program that takes one character from keyboard and display it. Use getch in place of scanf.
  • Write a program to display your name at the centre of the screen.
  • Write a program to demonstrate the use of escape sequences.
  • Write a program to demonstrate the use of format specifiers.
  • Write a program to print \n on the screen.
  • Write a program to print %d on the screen
  • Write a program to print “SCA”. Notice double quotes, it should enclosed the string when displayed on screen.
  • Write a program to demonstrate the difference between getch and getche.
  • Write a program to print address of variable of type int.
  • Write a program to perform input output operations on a variable and should be handled only by pointer.
  • Write a program to swap content of two variables. Variables should be created in main() and should be swapped by function swap(). (hint: Use call by reference)
  • Write a function to calculate area and circumference of a circle but results should be printed in main() function.    --------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------

No comments:

Post a Comment