Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 5 subjective questions Introduction to Arrays

CAP1008 — C Programming 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define an array. Explain how one-dimensional arrays are declared and initialized in C with suitable examples.

  2. Question 2 of 20

    Explain two-dimensional arrays in C. Describe their declaration, initialization, and memory representation.

  3. Question 3 of 20

    Write a C program to perform addition of two matrices and explain the logic.

  4. Question 4 of 20

    Explain the Bubble Sort algorithm with a C program and a worked example.

  5. Question 5 of 20

    Explain Linear Search and Binary Search. Distinguish between them.

  6. Question 6 of 20

    Write a C program to implement Binary Search and trace it on an example array.

  7. Question 7 of 20

    What are character arrays and strings in C? Explain the declaration and initialization of strings.

  8. Question 8 of 20

    Describe the commonly used string handling functions in C with syntax and examples.

  9. Question 9 of 20

    Write a C program to find the length of a string without using the strlen() function.

  10. Question 10 of 20

    Define a structure in C. Explain its declaration, definition, and initialization with an example.

  11. Question 11 of 20

    What is a union in C? Explain its declaration and initialization with an example.

  12. Question 12 of 20

    Distinguish between a structure and a union in C.

  13. Question 13 of 20

    Explain how arrays are passed to functions in C with an example.

  14. Question 14 of 20

    Write a C program to find the largest and smallest elements in a one-dimensional array.

  15. Question 15 of 20

    Explain Selection Sort with an algorithm, C program, and example.

  16. Question 16 of 20

    Explain the concept of an array of structures with an example program.

  17. Question 17 of 20

    Write a C program to concatenate two strings without using the strcat() function.

  18. Question 18 of 20

    Explain the transpose of a matrix. Write a C program to find the transpose of a matrix.

  19. Question 19 of 20

    Explain nested structures in C with an example. When are they useful?

  20. Question 20 of 20

    Describe common applications of arrays in C programming and discuss their advantages and limitations.

That's unit 5

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.