PSTC Imp Questions-MIC
PSTC Imp Questions-MIC
QUESTION BANK
UNIT-1
UNIT-2
1. What is two way selection statements? Explain if, if else, and Nested if-else with examples.
2. Explain Switch statement with syntax and flowchart. Write a program for displaying
whether a given character is vowel or not using switch statement
3. Write a program for performing arithmetic operations using switch statement
4. Explain while and do while loops with an example programs.
5. Write a program to classify a given number is prime or composite using for loop.
6. What is dangling else problem and how to get rid of it in C programming? Write a C program
to find the smallest of three numbers.
7. Write a “C” language program to find the factorial of given number “n”.
8. Write a “C” program to print the Fibonacci series.
9. Compare the following along with flowcharts (i) Else if ladder (ii) switch statement.
UNIT-3
1. What is an array? Explain the declaration, initialization and accessing of array elements
2. Write a program for sorting the elements in an array and demonstrate it with an
example. (Or) Write a “C” program for selection sort.
3. Explain the binary search algorithm with “C” program
4. Write a program for searching an element in an array.
5. Explain the differences between linear and binary search algorithms with programs.
6. Write a program for multiplication of two matrices.
7. Write a program to display whether a given matrix is symmetric or not
8. Explain built in functions used for String operations in C.
9. Define string. How string is declared and initialized? Explain string input/output
functions with an example.
10. What is string? Write a C program to display the reverse of a string without using built in
library functions.
UNIT-4
1. What is a function? Explain the elements of user defined function.
2. Explain the types of functions based on input parameters and output parameters
3. What is a recursion? Write a recursive program for gcd of two numbers
4. Explain storage classes with examples.
5. What is a pointer? What are the advantages and pointer variables when compared to normal
variables?
6. Explain declaration and initialization pointers.
7. Explain Call by value and call by reference with a program for swapping of two numbers
8. Explain how pointers are used with arrays.
9. Explain the following functions: (i) malloc() (ii) calloc() (iii) free() (iv)realloc().
10. Explain the preprocessor directives.
UNIT-5
1. What are the Structures and Unions in C? How are structures are different from unions?
Give an example program for Structure and Unions.
2. Explain nested structure with a suitable example program.
3. Explain structures with arrays with a suitable example
4. Explain how structures are passed in the functions.
5. What are the command line arguments in C, explain with an example.
6. Explain the function used for random access files.
7. Explain the following file functions (i) fscanf() (ii) fprintf() (iii) fgetc() (iv) fputc() .
8. Write a C program to copy the contents from one File to another File.
9. Explain various file modes in C.