Vous êtes sur la page 1sur 3

Unit I

1. What are the six steps of problem solving? 2. State a reason why each of the six problem solving steps is important in developing the best solution for a problem. Give one reason for each step. 3. What is an algorithmic and heuristic solution to the problem? Explain them with suitable examples 4. Define the following terms 5. (i) Solution (ii) Result (iii) Expression (iv) Equation (v) Syntax Debugging (viii) Pseudocode i) F= A + B/C D^2 ii) F = (A + B)/C D^2 iii) F = A + B/ (C D^2) iv) F = (A +B) MOD C v) F = (A+B) \ D^2 7. Evaluate the following equations given A = 5, B = 4, C = 3, D = 12: E = D MOD A * B E = A * B + D/C E= 5*A\D*(B+1) E = D/B * (A + 4)\ (C + 1)) 8. Discuss the steps in Organizing the problem 9. Why is it important to maintain a naming convention within the company that is developing computer programs? 10. Name the rules for naming constants and variables. 11. What is the difference between an expression and an equation? 12. Why is problem analysis important? 13. What are the relationships of the problem-solving tools to each other? 14. Why is it important to test a solution before coding the solution? 15. Name the data type for each of the following constants. Explain your answer. a. 5.38 b. 87654 c. True d. A e. 707-434-5555 f. New York (vi) Bug (vii)

6. Evaluate the following equations, given the values A = 12, B = 3, C = 6, D = 2:

g. -389 h. 2.45E6 i. 48976.0 j. False 16. What is a function? Why are functions used? 17. What is the difference between the operators /, \, and MOD? Give an example of each.

UNIT II
1. Name the major types of modules and explain their functions 2. What is meant by the cohesion and coupling of a module? 3. Define the two types of parameters. How do they differ? Under what circumstances would you use each type? 4. What is the difference between using a return value and a call-by-reference parameter? 5. What are the three types of decision logic? 6. Which flowchart symbols are used for the sequential logic structure? 7. How do you use a decision table? 8. What is the difference between internal documentation and external documentation? 9. What is meant by solution development? Why is it important? 10. Write a note on i) Sequential logic structure ii) data dictionary iii) decision table 11. State the major differences in the three types of loop structures. 12. Why would you use an automatic-counter loop over the other two? 13. Why would the case logic structure be used instead of the decision 14. Set up four different algorithms and flowcharts for calculating a students letter grade given the following (do not use straight-through logic):
90-100 = A, 80-89 = B 70-79 = C 60-69=D Below 60 = F 15. Without specific data, outline an algorithm and a flowchart for each of the three types of decision logic. 16. What factors should determine which decision logic type to use for a specific problem?

UNIT III 1. Explain when you would use: a. A one dimensional array b. A two dimensional array c. a multi-dimensional array
2. What is the pointer technique for finding data? Why is it used?

3. What is table lookup technique? 4. Explain array order reversal technique 5. Write an algorithm to find maximum number in a set of n numbers 6. Explain partitioning of a array 7. Design algorithm for left and right justifying the text 8. Write an algorithm for line editing 9. Write an algorithm to find smallest number in a set of n numbers 10. Write an algorithm to count occurrences of given pattern 11. Write an algorithm for keyword searching in text 12. Explain difference between linear and sub linear pattern match

Vous aimerez peut-être aussi