18CPL17/27 C PROGRAMMING LABORATORY BY SUNAGAR




 

Laboratory Programs:


1.   Familiarization with computer hardware and programming environment, concept of naming the program files, storing, compilation, execution and debugging, taking any simple C- code.


                                                           PART A


2. Develop a program to solve simple computational problems using arithmetic expressions and use of each operator leading to simulation of a commercial calculator. (NO built-in math function)

                                       

                   


3. Develop a program to compute the roots of a quadratic equation by accepting the coefficients. Print appropriate messages.





4.   Develop a program to find the reverse of a positive integer and check for palindrome or not. Display appropriate messages.  



5.   An electricity board charges the following rates for the use of electricity: for the first 200 units 80 paise per unit: for the next units 90 paise per unit: beyond 300 units Rs I perunit. All users are charged a minimum of Rs. 100 as meter charge. If the total amount is more than Rs 400, then an additional surcharge of 15% oftotal amount is charged. Write a program to read the name of the user, number of units consumed and print out the charges.





6.   Introduce I D Array manipulation and implement Binary search.




7.   Implement using functions to check whether the given number is prime and display appropriate messages. (No built-in math function)





          PART B


8.   Develop a program to introduce 2D Array manipulation and implement Matrix multiplication and ensure the rules of multiplication are checked.





9.   Develop a Program to compute Sin(x) using Taylor series approximation. Compare your result with the built- in Library function. Print both the results with appropriate messages.





10. Write functions to implement string operations such as compare, concatenate, string length. Convince the parameter passing techniques.





 11. Develop a program to sort the given set of N numbers using Bubble sort.




12.Develop a program to find the square root of a given number N and execute for all possible inputs with appropriate messages. Note: Don't use library function sqrt(n).





13.Implement structures to read, write and compute average- marks and the students scoring above and below the average marks for a class of N students.






14.Develop a program using pointers to compute the sum, mean and standard deviation of all elements stored in an array of n real numbers.





15.Implement Recursive functions for Binary to Decimal Conversion.










Post a Comment

0 Comments