PROGRAMMING LABORATORY

Credits
Periods
Exam Hrs.
Sessional Marks
Exam Marks
Total Marks
Theory
Tutorial / Lab
2
-
3
3
50
50
100



1.          Write a program to read x, y coordinates for 3 points and then calculate the area of a triangle formed by them and print the coordinates of the three points and the area of the triangle. What will be the output from your program if the three given points are in a straight line?

2.          Write a program, which generates 100 random integers in the range of 1 to 100. Store them in an array and then print the arrays. Write 3 versions of the program using different loop constructs. (eg. For, while, and do write).

3.          Write a set of string manipulation functions e.g. for getting a sub-string from a given position. Copying one string to another, reversing a string, adding one string to another.

4.          Write a program which determines the largest and the smallest number that can be stored in different data types of like short, int., long, float and double. What happens when you add 1 to the largest possible integer number that can be stored.

5.          Write a program, which generates 100 random real numbers in the range of 10.0 to 20.0, and sort them in descending order.

6.          Write a function for transposing a square metrix in place (in place means that you are not allowed to have full temporary matrix).

7.          First use an editor to create a file with some integer numbers. Now write a program, which reads these numbers and determines their means and standard deviation.

8.          Given two points on the surface of the sphere, write a program to determine the smallest arc length between them.

9.          Implement bisection method to find the square root of a given number to a given accuracy.

10.      Implement Newton Raphson method to determine a root of polynomial equation.

11.      given a table of x and corresponding f(x) values, write a program which will determine f(x) value at an intermediate x value using Lagrange’s interpolation.

No comments:

Post a Comment

SRKR ECE

This site has everything about electronic and communication to be shared here.. every one’s views, comments, quotes and articles are most welcome here.. we will help you on internet and its like your virtual world where you ll love to share and learn a lot. So hope everyone gets their chance of sharing and learning here. we request every visitor to this site to please make some thing great which really makes this a great place to live in. Hope every one of you find our site helpful..contact us @ srkrece@gmail.com