Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

ST.

JOSEPH’S INSTITUTE OF TECHNOLOGY


CS8251 – PROGRAMMING IN C
PRACTICE TEST - UNIT II

Part – A
1. What is an array? Write the syntax for multi-dimensional array
2. What is dynamic memory allocation?
3. Write a C program to store Fibonacci series in an array.
4. How is a Character String declared?
5. Write a C Program to length of the string.
6. Design a C program for compare any two string.
7. What is Binary Search?
8. What is meant by Sorting? What are its types?
9. What is a null character? What is its use in a string?
10. Give an example of initialization of string array.
11. What are the main elements of an array declaration?
12. Declare a float array of size 5 and assign 5 values to it.
13. What will happen when you access the array more than its dimension?
14. What is the difference between a “c" character and “c" string?
15. Name any six library functions used for string handling.
16. Write a C Program to copy the string one array to another array.
17. Write a C Program to find length of a String without using Library functions.
18. Define Searching.
19. What is the use of strcat() function?
20. How does array variable differ from an ordinary variable?

Part – B
1. (i) Write a C program to find the Sum and difference of two matrices.
(ii) Write a C program to find transpose of a matrix.
2. What is sorting? Write short notes on its types. Write a Program to Sort a set of numbers.
3. (i) Write a C program to search a given number in an array of elements using binary search
technique.
(ii) Write a program for multiplication of two matrices.
4. Write the following programs
(i) To sort the string alphabetically.
(ii) To count the length of each string.
(iii) To print whether each word is palindrome or not.

You might also like