C LAB PROBLEMS for [MCA I]
1. WAP of displaying Hello World!! 2. WAP of displaying variables 3. WAP of describing the structure of C program 4. WAP of converting unsigned decimal to hexadecimal number 5. WAP of converting unsigned decimal to octal number 6. WAP of reading variables and print them. (you can generate your own example to justify the question) 7. WAP of displaying ASCII code table 8.
WAP of finding greatest between 5 numbers given by the
user. (With if...else if construct) 9. WAP of calculating simple interest & compound interest 10. WAP
of converting Centigrade to Fahrenheit & vice-versa 11. WAP of calculating area of triangle given the base & height 12. WAP of identifying whether the given number is odd or even 13. WAP of identifying whether the given number is prime or not 14. WAP
of identifying how many prime numbers are there in-between 1 & 100 15. WAP
of creating Fibonacci series 16. WAP
exploring the facilities offered by printf 17. Draw pyramids using loops [for, while] 18. WAP of calculating sum of squares of n numbers 19. WAP of generating PASCALs triangle 20. Write
any five above programs using functions. [Non-returnable] 21. Write
any five above programs using functions. [Returnable] 22. Write any five above programs using functions. [Call by value method] 23. Write any five above programs using functions. [Call by reference method] 24. WAP of reversing the digit 25. WAP of reversing the string 26. WAP
of identifying whether the given digit is palindrome 27. WAP
of identifying whether the given string is palindrome 28. WAP of reversing the array of numbers and filled into the another array 29. WAP of adding two matrices 30. WAP of multiplying two matrices 31. WAP
of adding two matrices using functions [passing array to functions] 32. Accept four integers and print the 4-digit
number formed by concatenating them. 33. Accept the string and print it in between
any line. 34. WAP of calculating the factorial of the user
given number. 35. WAP of identifying the Armstrong number. 36. WAP to illustrate the sum of squares. 37. WAP to compute exponential series. 38. Convert at least 20 programs of your choice
into functions of non-returnable behaviour. 39. Convert the other programs of your choice
into functions of returnable behaviour. 40. Create a header file and save all the
functions in your header file and attached into your any C file and use the
functions as per your desire in your C file. 41. Use any of the above programs to practice
the command line argument concept. 42. Write a function that takes a string and a
number between 0 and 9 as parameters, display the string that many
times, and returns its length. 43. Write a function to accept 10 characters and
to display whether each input character is a digit, or a lower case alphabet or
an upper case alphabet. 44. Write a function to perform addition and
subtraction of two numbers. Use them in a program to compute the sum and
difference of input numbers. 45. Write a function to swap two numbers
without using a temporary variable. What type of parameters would you use? 46. WAP using functions to concatenate two
strings, extract a substring from a string, and replace a substring in a
string and to find the length of string. 47. Write a function to perform Linear Search. 48. WAP to compute Y=X^{x
n} up
to as many terms as required. Use longint and ensure the maximum value
is not exceeded. 49. WAP that consists of two files sum.c and mainJi.c. The file sum.c has
a function that takes two integers arguments and stores the result in a global
shared variable called sum. Accept the two inputs in mainJi.c, call the function sum.c and print the result in mainJi.c. 50. WAP as an example of showing the difference
between using the static keyword with variable inside functions and global
variables? 51. What is the use of the extern
keyword? Illustrate with an example 52. WAP to trace the order of matrix from the
user and print the matrix as per the order traced from the user. 53. WAP of storing 54. WAP of strcat(), strcmp(), strcpy(),
strlen(), strchr(). 55. WAP of calculating grades of n
students from 3 tests. 56. WAP of calculating Mean, Variance and
standard deviation. 57. WAP to find the symmetry of the matrix. 58. WAP to count the vowels, consonants and
spaces in a line. 59. Accept the
names and marks of 10 students in 6 subjects. Print the list. Also print the
name of the first ranker, his/her percentage and his/her result and division. 60. WAP to find
the smallest value in an array of n elements using pointers. 61. WAP for the
following output: 62. WAP of
illustrating the declaration and use of pointers to pointers. 63. WAP for
illustrating void pointers. 64. Write a
function that accepts character into a string by using a pointer. Compute the
length of the array using a pointer, given that the string is terminated by a null
[\0] character. Finally print the string in reverse order using pointer. 65. Write a
function that accepts a string as argument and returns 1 if it is a palindrome
and 0 if it is not. 66. Illustrate
the main purpose of passing variables by pointers, with the help of a function
which swaps two integers. 67. WAP to
process student records by using structures. 68. WAP Class.c
to ensure that the address field is itself a structure which contains the
following fields: street, block, area, city and country 69. Create a database
of a cricket team. The information should be categorized into: runs achieved,
wickets taken, catches taken, catches dropped and run outs. Each player should
be designated as either a batsman or a bowler. The captain, vice captain and
wicket-keeper should have special status. Print the statistics of each player
at the end of the season, giving all the information possible. 70. Construct a
program for managing the membership of a library. There are 2 kinds of members;
those who can borrow a. 2 books at a
time for 2 days b. 4 books at a
time for 4 days WAP
that accepts the name, code number and duration of the books borrowed and,
displays the names and other information of all those members having dues. 71. WAP to copy a
file to another. 72. WAP that
accepts two filenames as command line parameters/arguments and appends the
second file to the first. Note that in main, the first file is opened in
the append mode, while the second one in read mode. 73. WAP to
convert the case of alphabets in a text file. Uppercase letters should be
converted to lower case and vice versa. 74. WAP to store
the data of students name, register number, and marks for 6 students. Display
the data stored. Use a menu to enter the choice from the user to create a new
data file or read the content of a previously created file. 75. WAP to
implement the following data encryption technique. 76. WAP to change
the alphabets in a file in the following manner. 77. WAP of
illustrating self-referential structures. 78. WAP of
illustrating dynamic memory allocation using integer values and using
structures. |