B.C.A.
– I Semester
Problem Solving Techniques
Time: 2½ Hours Max Marks: 60
Instruction: Answer any four questions from each
Part.
PART – A (4 × 2 = 8)
1. What is an algorithm? Mention any two characteristics of an algorithm.
2. What is a variable? Give an example.
3. Define an identifier. Give an example of a valid identifier.
4. What are escape sequences in C?
5. What is an array? How is it initialized?
6. What is modular programming?
7. Define C-tokens with an example.
8. What are asymptotic notations?
9. What is sorting? Mention different sorting methods.
10. What is a constant? How is it declared in C?
PART – B (4 × 5 = 20)
11. Write an algorithm for summation of N natural numbers.
12. Explain the steps involved in analysis and designing of an algorithm.
13. What is data type? Explain different data types with examples.
14. Write a program to find the factorial of a number.
15. Write a program to find the sum of digits of a given integer.
16. Mention any five string library functions with examples.
17. Differentiate while and do-while loops with examples.
18. Explain the syntax of switch-case statement with an example.
19. Write an algorithm to perform binary search on a given set of elements.
20. Write an algorithm to perform hash search on a given set of elements.
PART – C (4 × 8 = 32)
21. a) Explain loop control structures in C with general syntax.
b) Differentiate between break and continue statements.
22. Explain the structure of a C program. Differentiate if and if-else statements with examples.
23. Explain various operators available in C with examples.
24. a) What is a pointer? Explain pointer initialization.
b) Write a program to find the size of integer, character and real pointers.
25. Write a C program to find GCD of two numbers. Also write an algorithm to compute prime
factors of an integer.
26. a) Write an algorithm to find the maximum element in an array.
b) Sort the array using insertion sort: 43, 75, 21, 31, 12
27. Write an algorithm to sort a set of elements using selection sort. Explain bubble sort with an
example.
28. Write a program to multiply two matrices.
29. a) Distinguish between structure and union with examples.
b) Explain orders of growth.
30. a) Explain pattern searching / keyword searching in text.
b) How is hash-based search better than binary search?