PPS Unit3
PPS Unit3
6. What is a function?
7. How many types of functions are there? (Ans: 2
predefined and user-defined)
8. What is pre-define and user-defined function?
9. List any 10 predefined function names.
(Ans :
pow( ),sin( ),cos( ),tan( ),sqrt( ),strlen( ),strcpy( ),strcat( ),strcm
p( ),exit( )).
1. What is a pre-processor?
2. Explain the use of pre-processor? (Ans: symbolic
constants,macros and conditional compilation)
3. List some pre-processor directives.
4. Give an example of macros with parameter.
5. What is an array?
6. Write the syntax for array declaration.
7. Explain the use of array with the help of an
example array declaration.
8. How many searching techniques are there? (Ans:
2, linear search and binary search)
9. Explain the working of linear search.
10. Explain the working of binary search.
11. Which searching technique is efficient and
why? ( Ans: Binary search, as it takes
less no.of comparisons to search an element)
12. What is the limitation of binary search? (Ans:
works only on sorted arrays)
13. What is sorting? Name some different sorting
techniques.
14. What is bubble sort? Explain its working.
15. Explain the working of selection sort.
16. What is the syntax for declaring a 2-D array?
Explain with the help of example.
17. How much memory is allocated to array a, if it
is declared as : int a[10][5];
18. Explain how a 2-D array can be initialized at
the time of declaration. (Hint : comma separated
initializer-list)
19. Explain how an array can be passed to a
function.