Вы находитесь на странице: 1из 6

INTORDUCTION TO PRGRAMMING ETCS 109 SECOND SEMESTER A. List of Experiments (list of experiments given by G.G.S.I.P.U) 1.

Write a program to produce ASCII equivalent of given number 2. Write a program to find divisor or factorial of a given number. 3. Write a program to evaluate the following algebraic expressions after reading necessary values from the user (ax+b)/(ax-b) 2.5 log x-cos 30+|x^2-y^2|+sqrt (2xy) (x^5+10x^4+8x^3+4x+2 4. Write a program to find sum of a geometric series 5. Write a program to cipher a string 6. Write a program to check whether a given string follows English capitalization rules 7. Write a program to find sum of the following series 1+ + 1/3 +________+1/20 8. Write a program to search whether a given substring exist in an input string or not and then delete this string from input string. 9. Write a recursive program for tower of Hanoi problem 10. The fibonacci sequence of numbers is 1,1,2,3,5,8. Based on the recurrence relation F(n)=F(n-1)+F(n-2)for n>2 Write a recursive program to print the first m Fibonacci number 11. Write a menu driven program for matrices to do the following operation depending on Whether the operation requires one or two matrices a) Addition of two matrices b) Subtraction of two matrices c) Finding upper and lower triangular matrices d) Trace of a matrix e) Transpose of a matrix f) Check of matrix symmetry g) Product of two matrices. Write a program that takes two operands and one operator from the user perform the operation and then print the answer Write a program to print the following outputs: 1 1 2 2 2 2 3 3 3 3 3 3 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 Write functions to add, subtract, multiply and divide two complex numbers (x+iy) and (a+ib) Also write the main program. Write a menu driven program for searching an sorting with following options:a) Searching (1) Linear searching (2) Binary searching b) Sorting (1) Insersection sort (2) Selection sorting Write a program to copy one file to other, use command line arguments. Write a program to mask some bit of a number (using bit operations) An array of record contains information of managers and workers of a company. Print all the data of managers and workers in separate files

12. 13.

14. 15.

16. 17. 18.

INTORDUCTION TO PRGRAMMING ETCS 109 SECOND SEMESTER


B. LIST OF EXPERIMENTS (Beyond the list of experiments given by G.G.S.I.P.U) B1. Programs on basic input, output functions and variables concept 1. W.A.P that displays the message enter an integer value on the screen. It reads the value in a variable called val and displays it on the screen with the message the value entered by you is = . 2. W.A.P that reads two values A and B exchanges their contents and prints the output. B2. Programs on operators and expressions 3. W.A.P to that reads two integers x and y. It prints x if x > y and otherwise it prints y is greater. Do this using conditional operator. 4. W.A.P that inputs the desired values to find the area of a triangle, sphere and circle. B3. Programs on decision control statements 5. W.A.P that reads the units of consumption of electricity by a consumer during a month. The charges per unit of electricity consumed are 90 paisa. The minimum payable amount is Rs.30. the program prints the net payable charges. 6. W.A.P that reads three sides of a triangle and determines whether a triangle can be formed using the given data or not. 7. W.A.P that reads an integer number and determines whether it is divisible by 7 or not. If not then it finds the nearest integer divisible by 7 and prints it. 8. W.A.P that finds whether the number entered by the user is zero, positive or negative number. 9. W.A.P which computes the roots of the quadratic equation. 10. W.A.P to that reads a character in upper case and print out whether it is a vowel or not. 11. W.A.P which reads three integers representing date i.e. date is entered in the form of dd/mm/yy and it prints in full. Example 14/06/2010 so it will print 14 june 2010. B4. Programs on flow control statements 12. W.A.P to print all the even and positive numbers between 2 to 100 and then display the sum of those numbers. 13. W.A.P which counts the number of times a ball bounces before it stops and rest on the ground. Assume that with each bounce, it reaches 0.8 its previous bounce. The ball is considered to be at rest if height is less than 2.0cm. Read the initial height from the user using do while loop. 14. W.A.P that gives an arithmetic test to a person sitting at the keyboard. The person responses to a question placed by the program and the program read the answer. The program keeps on asking the user to try again as long as the answer is wrong. Suitable messages are to be displayed during the run of the program. 15. W.A.P to find the factorial of the number entered by the user. 16. W.A.P that prints the sum of first 20 natural numbers and also their average. 17. W.A.P that inputs two numbers first number is of n number of digits and the second number is of single digit. The program will find whether the second digit is contained in the first number or not. 18. W.A.P to generate the following pattern using switch and without using gotoxy( ) function. 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 19. W.A.P to print all integers between 2 to 100 inclusive and then print the reverse of each of the number displayed. 20. W.A.P to find the sum of the digits of the number entered by the user. 21. W.A.P that reads 10 numbers and computes the average, maximum and minimum values from those numbers.

B5. Programs unformatted input and output functions 22. W.A.P that reads an alphabet ch from the user and prints it in the reverse case i.e. if input is in the lowercase than the output should be in the uppercase. 23. W.A.P that inputs characters A E one by one from the user and displays them on the screen. 24. W.A.P that reads a character from the user and displays its successor on the screen. 25. W.A.P that reads the character from the user and determines whether it is in upper case or lower case. 26. W.A.P that takes a character as an input and checks whether it is an alphabet or not. If yes then it checks whether it is a vowel or not. If both the conditions are true it displays the message the character entered is a vowel on the screen. 27. 28. 29. 30. 31. B6. Programs structured data types: arrays W.A.P which reads n numbers from the user and then displays those numbers in reverse order. W.A.P that finds the minimum number from the array and also its position. W.A.P which inserts a value in an array at a particular position. W.A.P that computes the sum of the diagonal elements of a square matrix. Given a set of randomly ordered numbers, sort them in ascending order by selection sort method.

B7. Programs on strings 32. W.A.P that reads a string and counts the number of vowels, words and white spaces present in the string. 33. W.A.P that reads the name, rollno and total marks of all the students in a class and then generates a merit list. 34. W.A.P that allows the user to enter a character until he inputs the character q. Each time a character is entered, the program displays whether it is an alphabet or not. 35. W.A.P to find the location of the word in a string entered by the user. For example, if the string entered is somewhere over the rainbow and the word whose location is to be found is over. So the output should be 11. B8. Programs on functions + pointers W.A.P to swap to numbers using call by reference. W.A.P that computes xy with the help of recursion. W.A.P that displays the contents of an array using pointer to a pointer array. W.A.P that calculates the maximum value from an array using pointer to a pointer array and then passes this value to the function display() and then displays this value in that function. 40. Write a menu driven program to do the following : a) Find factorial of a number entered by the user using functions. b) To swap to numbers using call by value. c) To reverse a number using functions. 36. 37. 38. 39.

Index of the students record file: INTRODUCTION TO PROGRAMMING PRACTICAL RECORD PAPER CODE Name of the student University Roll No. Branch Section/ Group : : ETCS - 156 : : :

PRACTICAL DETAILS a) Exp. no Experiments according to the list provided by GGSIPU Experiment Name Date of performance Date of checking Remarks Marks (10)

B) Experiments beyond the list of experiments provided by GGSIPU (practical in C language as well as in other programming language). Exp. no Experiment Name Date of performance Date of checking Remarks Marks (10)

PROJECT DETAILS 1. TITLE 2. MEMBERS IN THE PROJECT GROUP : 3. PROJECT REPORT ATTACHED a) a) YES YES b) b) 4. SOFT COPY SUBMITTED : NO : NO :

Signature of the lecturer ( )

Signature of the student ( )

Вам также может понравиться