Question bank
Module 1
| SL. No | Question | Importance |
|---|---|---|
| Explain various types of computer languages with examples. Compare machine language, assembly language, and high-level languages | ☆★ | |
| Describe the steps involved in creating and running a program using a high-level language. | ☆★ | |
| What is System Development? Explain in detail the phases of the System Development Life Cycle (SDLC) with a suitable diagram. | ☆★ | |
| Explain the history of the C programming language. Who developed it? | ☆★ | |
| Why is C considered a middle-level language? Give examples to justify your answer. | ☆★ | |
| What is meant by C being a structured language? Explain | ☆★ | |
| Explain why C is called a programmer's language. Discuss its main features that support system-level programming. | ☆★ | |
| Differentiate between a compiler and an interpreter. Give examples and explain when each is used. | ☆★ | |
| Describe the typical form of a C program. Explain the role of header files, main function, and statements in a program. | ☆★ | |
| Explain the concept of library and linking in C. | ☆★ | |
| What is separate compilation in C? Explain | ☆★ | |
| Describe C's memory map in detail. | ☆★ | |
| List the basic data types in C and their typical sizes. | ☆★ | |
| What are type modifiers in C? Explain with examples. | ☆★ | |
| Define an identifier in C and mention the rules for naming identifiers. | ☆★ | |
| Explain variables in C. Differentiate between initialized and uninitialized variables with examples. | ☆★ | |
| Discuss the four scopes of variables in C (local, global, block, and function parameters) with examples. | ☆★ | |
| Explain type qualifiers in C. | ☆★ | |
| What are storage class specifiers in C? | ☆★ | |
| Explain constants in C. List different types of constants and their usage in programs. | ☆★ | |
| Discuss operators in C. Explain types of operators | ☆★ |
Module 2
| SL. No | Question | Importance |
|---|---|---|
|
What is Console I/O in C? Explain the role of the |
☆★ | |
| Describe the functions used for reading and writing single characters in C. Provide examples using getchar() and putchar(), and explain the significance of EOF. | ☆★ | |
| Explain the gets() and puts() functions. Why is gets() considered unsafe? Suggest a safer alternative. | ☆★ | |
| What is Formatted Console I/O? Compare and contrast the printf() and scanf() functions. | ☆★ | |
| Explain the printf() function in detail. Describe its prototype, return value, and list at least five common format specifiers with examples. | ☆★ | |
| What are format modifiers in printf()? Explain the use of minimum field width, precision specifiers, and alignment with examples. | ☆★ | |
| Write the rules or guidelines for using the printf() function effectively. | ☆★ | |
| Explain the scanf() function in detail. Why is the address-of operator (&) necessary for most arguments, and what is the exception? | ☆★ | |
| How can you read a string from the user in C? Compare and contrast the methods using scanf(), gets(), and repeated getchar() calls. | ☆★ | |
| How can you display a string in C? Compare the use of printf(), puts(), and repeated putchar() calls with examples. | ☆★ | |
| Create a summary table of the standard C library functions for Console I/O (getchar, putchar, gets, puts, printf, scanf), stating their purpose and required header file. | ☆★ | |
| How are True and False represented in C? Explain with an example. How does this concept apply to conditional expressions? | ☆★ | |
| What are Selection (Branching) Statements? Differentiate between Conditional and Unconditional Branch statements and list the types under each category. | ☆★ | |
| Explain the if statement with its syntax, flowchart, and a suitable example. | ☆★ | |
| Explain the if-else statement. How does its "two-way decision" logic work? Provide an example program to check if a number is even or odd. | ☆★ | |
| What is a Cascaded if-else or if-else-if ladder? When is it used? Explain with an example such as a grading system. | ☆★ | |
| Describe the switch statement. Explain its syntax, the role of the case and default keywords, and the importance of the break statement. | ☆★ | |
| Compare and contrast the if-else-if ladder and the switch statement. When would you choose one over the other? | ☆★ | |
| What are Iterative Statements (Loops)? Name the three types of loops in C and describe a scenario where each would be appropriate. | ☆★ | |
| Explain the for loop in detail. Describe its syntax (initialization, test expression, increment/decrement) and working principle with a flowchart and example. | ☆★ | |
| Explain the while loop. How does it differ from a for loop? Provide an example to calculate the factorial of a number using a while loop. | ☆★ | |
| Explain the do-while loop. Why is it called an exit-controlled loop? Provide an example and illustrate its difference from a while loop using a flowchart. | ☆★ | |
| Create a detailed comparison table between the while loop and the do-while loop based on type of control, test type, syntax, working principle, and semicolon usage. | ☆★ | |
| What are Nested Loops? Provide a C program using nested for loops to print a right-angled triangle pattern of stars (*). | ☆★ | |
| Explain the Unconditional Branch Statements: break, continue, and goto. For each, describe its purpose, syntax, and a simple example. | ☆★ | |
| What are Block Statements (Compound Statements)? How are they defined, and where are they commonly used? Provide an example of a free-standing block. | ☆★ |
Module 3
| SL. No | Question | Importance |
|---|---|---|
| What is an Array in C? Explain with a diagram how elements are stored in consecutive memory locations and accessed using indices. | ☆★ | |
| How do you declare a single-dimensional array in C? Explain the syntax type name[size]; with an example. What is the significance of the index starting from 0? | ☆★ | |
| Explain Array Initialization in C. What happens during partial initialization? Provide examples of declaring arrays with and without specifying the size. | ☆★ | |
| How are elements accessed in an array? Write a C program to read 10 integers into an array and display them using a loop. | ☆★ | |
| Explain the concept of "Generating a Pointer to an Array." How does the array name relate to the address of its first element? | ☆★ | |
| How are Single-Dimension Arrays passed to functions in C? Explain with a function prototype and a call example. | ☆★ | |
| Describe the three different ways a function can receive a single-dimension array as a parameter (int *x, int x[10], int x[]). |
☆★ | |
| What is a String in C? How is it different from a character array? Explain the role of the null character (\0). | ☆★ | |
| List and explain at least five string handling functions from the <string.h> library (strlen, strcpy, strcat, strcmp, strchr), including their syntax and purpose. | ☆★ | |
| Write a C program to demonstrate the use of strcpy(), strcat(), and strcmp() with user-input strings. | ☆★ | |
| What are Two-Dimensional Arrays? How are they declared and visualized (rows and columns)? Provide the syntax and an example declaration. | ☆★ | |
| How do you access elements in a two-dimensional array? Write a program to read a 3x3 matrix from the user and print its transpose. | ☆★ | |
| Explain how two-dimensional arrays are stored in memory (Row-Major Order). How does this affect pointer arithmetic when accessing elements? | ☆★ | |
| How do you pass a Two-Dimensional Array to a function? Why must the column size be specified in the function parameter? Show the correct syntax. | ☆★ | |
| What are Multidimensional Arrays? Give an example declaration of a three-dimensional array and explain how it can be conceptualized. | ☆★ | |
| What is a Variable-Length Array (VLA)? How is it declared, and what are its potential advantages and limitations compared to fixed-size arrays? | ☆★ | |
| What are Pointers? Explain the fundamental concept of a pointer variable storing a memory address. Use a simple analogy. | ☆★ | |
| How do you declare Pointer Variables? Explain the syntax type *ptr; and the importance of the base type (int, char, etc.). | ☆★ | |
| Explain the two Pointer Operators: Address-of (&) and Dereference (*). Provide a code example that demonstrates both operators. | ☆★ | |
| What are Pointer Expressions? Describe how assignments (p1 = p2), arithmetic (p++, p + i), and comparisons (p1 == p2) work with pointers. | ☆★ | |
| Explain the close relationship between Pointers and Arrays. Show with an example how array indexing arr[i] is equivalent to pointer arithmetic *(arr + i). | ☆★ | |
| Write a C program to traverse a character array (string) using a pointer, printing each character until the null terminator is found. | ☆★ | |
| What is Multiple Indirection (Pointer to a Pointer)? Explain the concept with a diagram and a code example (int x, *p, **q;). | ☆★ | |
| How do you Initialize Pointers? Why is it dangerous to use an uninitialized pointer? Explain the use of NULL or 0 for null pointers. | ☆★ |