Sunday 28 April 2019

C Programming Practice Programs


1.write a menu driven prog to accept and display book info of libarary (using struture) - Add book information - Dispaly bookinformation - Exit 

2.write a prog to calculate factorial of given no using recursion

3.C Program to Reverse the Contents of a File and Print it

4.write a prog to accept and display customer info. write a funvtion to print the account no and name of customer with balance beow 100(using structure)

5.Copy the content of one file into another file

6. sum of elememts of mxn matrix using dynamic memory allocation

7. wite c prog to perform following opeartions on string using user defined function 1.calculate length of string 2.copy one string to another

8. sum of elememts of mxn matrix

9.Accept n number from user and store into array and count number of occurances of each element

10.WAP for string check if one string is substring of another count occurences exit

11. accept n nos from user and stror all prime no into array and display this array 

12.store the records of students in a file using structure 

13. write c program to sort elements of an array in asecnding order using dynamic memory alloaction

14. number of characters,number of wovels and wordsfrom te text file

15.C Program to Find Union & Intersection of 2 Arrays

16. Accept string from user & replace all occurances of 'a' by '*' symbol

19.write a menu driven prog to accept and display book info of libarary (using struture)

20. multiplication of elememts of mxn matrix using dynamic memory allocation

21.A scooter has serial nos from AA0toFF9. Use a structure pointer - Retrive all information of scooter within rannnnn BB0 and CC9 - Display the oldest scooter

22. sum of serise using function sum = 1+1/x+1/x2+1/x3+1/x4+.....

23. write C prog o accept 2 strings an dcom[are them. if they are equal display there lenght. ifstr1>str2 convert str1 to uppercase and str2 to lower case and display the strinds and vice versa

24. a C prog to calculate sum of digit till it reduces to single digit using recursion

25.write a menu driven prog to accept and display employee (using struture) - search by id - Display name of emp having salary is greater then 10000

26.write a C prog to display transpose of matrix using user defined function

27. create structure student having fields roll noand name. accept details of student fom th use store it into the file and calculate the size of file

28.write a menu driven prog to accept and display employee (using struture) and display emp inforamtion having maximum salary

29.WACp Accept three numbers as command line argument and find out min max and avg

30. Write a C prog to convert decimal no into binary,octal, hexadecimal write seperate user defined function for each option


31.write a prog to accept 4 digit no from user and count zero,odd and even digits of entered no */

32. write a C prog to generate fillowing pattern for n lines Aa Aa Bb Aa Bb Cc Aa Bb Cc Dd  

33.write a C prog to check wheather given no is amstrong or not  

34. write a C prog to calculate sum of digit of given no  

35.write a C prog to accept a string from user and generate following pattern (eg input string is "abcd") a ab abc abcd abc ab a 


36.write prog to accept string from user and delete all vowles from string and display the result 

37.display pattern for n lines 1 2 3 4 5 6 7 8 9 10 

38. Display Star Pattern 

39.write a prog to calculate sum of fibonacci series up to given no  

40.write prog to calculate x to the power y without using std function 

41.write a C prog to accept character and dispaly it,s ASCII value and it's next and previous character 

42. write prog to calculate x to the power y without using std function 

43.write prog to accept string from user and display alternate chracters 

44.write a prig to aclculate following area : 1.circle 2.Rectangle 3.triangle 

45.accept no check it is palindrom or not same as Slip no 29_1 & Slip no 30_1  

46.write a C prog to check wheather given no is perfect or not 

47.write prog to generate following pattern for n lines 1 3 5 7 9 11 

48.Write a function isEven, whichaccepts an int as parameter abd return 1 if number is even otherwise return 0  

49.write prog to display multiplication table up to given no 

50.write prog to accept chatacter from user and check it is alphabet,digit or punctuation symbol if it alphbet check it is lower case or upper acse and then change it's case 

51. temperature conversion Formulae f=c*9/5+32 c=(f-32)*5/9

52.write a prog to swap two numbers using bitwise operator.

53.write a prog to accept n nubers and display sum of all +ve and -ve numbers

54.display each digit in words

55.write a prog to accept n nubers and display sum of all even numbers in an array


56.write a prog to accept string from user and display alternate charcter in upper case

57) write a prog to accept n nubers and display sum of all even numbers in an array 

58) write a prog to accept string from user and display alternate charcter in upper case