Overview of C, Selection Structures & Loops
Array
1-Mark Questions
11- What is the role of a compiler?
- What are bitwise operators?
- What is an expression in C?
- Define a variable.
- What are relational operators?
- What is type conversion?
- What is the difference between syntax errors and logical errors?
- What are command-line arguments?
- Write an algorithm to find the greatest of three numbers.
- What is the difference between break and continue?
- What is the purpose of the switch statement?
5-Mark Questions
10- Explain arithmetic, logical and bitwise operators with suitable examples.
- Explain the importance of operator precedence and associativity. Write the operator precedence table.
- Evaluate the given C expressions using operator precedence and associativity rules.
- Explain the printf() and scanf() functions in C.
- Explain the commonly used format specifiers in the scanf() function.
- Explain implicit and explicit type conversion with examples.
- Explain the various conditional statements used in C with suitable examples.
- Compare the switch statement and nested if-else statement with examples.
- Differentiate between entry-controlled and exit-controlled loops with examples.
- Demonstrate the various control statements available in C.
10-Mark Questions
3- Write a C program to find the roots of a quadratic equation using the if statement.
- Write a C program to determine whether an entered character is a vowel using a multiway selection statement (switch).
- Write a C program to print a given pattern using loops.
Functions, Pointers & Modular Programming
Array
1-Mark Questions
14- What is top-down design?
- What is a structure chart?
- What is a function in C?
- What is a library function?
- What is a function with input arguments?
- What is a pointer?
- What is the indirection operator?
- What is an output parameter?
- What is modular programming?
- What is the scope of a name?
- What is meant by passing an argument to a function?
- What are input/output parameters?
- What is the difference between actual and formal parameters?
- Why are functions used in program development?
5-Mark Questions
9- Explain top-down design with a suitable example.
- Explain library functions in C with examples.
- Explain pointers in C with suitable examples.
- Explain how pointers are passed to a function in C.
- Explain call-by-value and call-by-reference methods with suitable examples.
- Explain how to declare and define a function in C with an example.
- Explain the different ways of passing parameters to functions.
- Explain function prototype, function call and returning from a function.
- Explain the advantages of pointers in C.
10-Mark Questions
3- Write a C program to swap two numbers using call by reference.
- Write a C program to illustrate call by value and call by reference methods.
- Write a C program using pointers in functions to perform arithmetic operations on two integers.
Arrays & Strings
Array
1-Mark Questions
15- What is an array?
- How is a one-dimensional array declared in C?
- What is an array subscript?
- How are array elements accessed sequentially?
- How can an array element be passed to a function?
- What is an array argument?
- What is a parallel array?
- What is an enumerated type?
- What is a multidimensional array?
- What is a string in C?
- How is a string represented in C?
- What is string concatenation?
- What is string comparison?
- Name any four string library functions.
- What is an array of pointers?
5-Mark Questions
10- Explain declaration and referencing of arrays with examples.
- Explain array subscripts and sequential access using for loops.
- Explain how array elements can be passed to functions.
- Explain array arguments with a suitable C program.
- Explain the enumeration data type with an example.
- Explain how to create and access elements of multidimensional arrays in C.
- Explain multidimensional arrays with an example.
- Explain string basics and string representation in C.
- Explain built-in string-handling functions with suitable examples.
- Explain arrays of pointers.
10-Mark Questions
7- Write a C program to find whether a given string is a palindrome.
- Write a C program to reverse the contents of an integer array without using another array.
- Write a C program to multiply two matrices of order m × n, covering all necessary conditions.
- Write a C program to transpose a 3 × 3 matrix.
- Write a C program to find the maximum element in a given array.
- Write a C program to perform addition of two matrices.
- Develop a C program to perform searching and sorting operations on an array.
Recursion, Structures & Unions
Array
1-Mark Questions
15- What is recursion?
- What is a recursive function?
- What is the base condition in recursion?
- What is meant by tracing a recursive function?
- Give two examples of recursive mathematical functions.
- What are recursive array functions?
- What are recursive string functions?
- What is a structure in C?
- What is a user-defined structure type?
- How is structure data passed to a function?
- What is a structured result value?
- What is a union?
- What is the difference between a structure and a union?
- Why are user-defined data types useful?
- What is a structure type data parameter?
5-Mark Questions
9- Explain the nature of recursion with an example.
- Explain how a recursive function is traced.
- Explain recursive mathematical functions with examples.
- Explain recursive functions with array parameters.
- Explain recursive functions with string parameters.
- Define structure and explain the general format for declaring and accessing structure members with an example.
- Explain functions with structured result values.
- Explain union types in C.
- Differentiate between structures and unions.
10-Mark Questions
7- Write a C program to print the Fibonacci series using recursion.
- Write recursive and non-recursive functions to print the Fibonacci series.
- Write a recursive function in C to find the sum of array elements.
- write a recursive function to find the factorial of a given number.
- Write a recursive C program to find the GCD of two numbers.
- Write a recursive function to solve the Tower of Hanoi problem.
- Write a C program to read, display and add two complex numbers using structures.
Files, Searching & Sorting
Array
1-Mark Questions
13- What is a file in C?
- What is a file pointer?
- What is file input/output?
- What is a text file?
- What is a binary file?
- What is the purpose of a file pointer?
- What is meant by searching a database?
- What is sorting?
- What is bubble sort?
- What is insertion sort?
- What is selection sort?
- What is the basic idea of linear search?
- What is the basic idea of binary search?
5-Mark Questions
12- Explain text files in C.
- List and explain various operations performed on text files using file I/O functions in C.
- Explain the purpose of fseek(), ftell() and rewind() functions.
- Discuss random access using fseek(). Give a brief note on ftell() and rewind().
- Explain the different types of files and file-handling functions used in C.
- Explain the difference between text and binary streams.
- Explain binary search with a suitable example.
- Explain the binary search algorithm with an example.
- Write an algorithm to sort an array using Bubble Sort and trace the algorithm with an example at each phase.
- Explain the Bubble Sort method with a suitable example.
- Explain which searching technique is best among linear search and binary search. Justify your answer.
- What are the limitations of the linear search algorithm?
10-Mark Questions
2- Write a C program to count the number of words in a text file.
- Write a C program to merge the contents of two existing files into a new file.
Exam Preparation Tip
Begin with the 1-mark questions to revise important definitions and concepts. Then practice the 5-mark questions for conceptual understanding and use the 10-mark questions to prepare detailed answers and programming-based questions.