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 4 subjective questions Arrays in C

CSE101 — Computer Programming 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define an array in C. Explain the syntax for declaring and initializing a One-Dimensional (1D) array with examples.

  2. Question 2 of 20

    Explain how elements of a 1D array are stored in memory. If the base address of an integer array is 1000 and the size of an integer is 2 bytes, calculate the address of .

  3. Question 3 of 20

    Write a C program to find the sum and average of elements stored in an array.

  4. Question 4 of 20

    Differentiate between One-Dimensional and Two-Dimensional arrays. Provide the syntax for declaring a 2D array.

  5. Question 5 of 20

    Explain Row-Major and Column-Major ordering for storing 2D arrays. Derive the address calculation formula for Row-Major order.

  6. Question 6 of 20

    Write a C program to perform Matrix Addition for two matrices.

  7. Question 7 of 20

    Describe the mechanism of passing arrays to functions in C. How does passing a 1D array differ from passing a single variable?

  8. Question 8 of 20

    Write a C program to multiply two matrices. Include checks for compatibility of matrix dimensions.

  9. Question 9 of 20

    Explain the algorithm to insert an element into a specific position in a 1D array.

  10. Question 10 of 20

    Write a function in C to delete an element from an array given its position.

  11. Question 11 of 20

    What is Linear Search? Write a C program to implement Linear Search.

  12. Question 12 of 20

    Explain the logic of Binary Search. What is the mandatory prerequisite for Binary Search? Calculate its Time Complexity.

  13. Question 13 of 20

    Write a C program to implement Binary Search algorithm recursively or iteratively.

  14. Question 14 of 20

    Compare Linear Search and Binary Search based on efficiency and requirements.

  15. Question 15 of 20

    What is Bubble Sort? Explain its working principle with an example pass.

  16. Question 16 of 20

    Write a C program to sort an array of integers in ascending order using Bubble Sort.

  17. Question 17 of 20

    Trace the Bubble Sort algorithm for the input array: {64, 34, 25, 12, 22}. Show the array status after every pass.

  18. Question 18 of 20

    Write a C program to find the Transpose of a given Matrix.

  19. Question 19 of 20

    What are the advantages and limitations of using Arrays in C?

  20. Question 20 of 20

    Write a C program to find the largest and smallest element in an array along with their indices.

That's unit 4

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.