Exam-Oriented Previous Year Questions

Arrays and Strings in C – Previous Year Questions (PYQs)

JNTUH • CBIT • VASV • VCE | IPLTS

This page provides a complete collection of Previous Year Questions (PYQs) on Arrays and Strings in C Programming asked in engineering examinations from colleges such as JNTUH, CBIT, VASV and VCE. The questions are organized topic-wise, mark-wise, and exam-oriented to help students prepare effectively for semester exams, lab viva, and competitive tests.

ARRAYS – Short & Long Answer Questions

Year – 2025


  1. The memory occupied by an array int Mat[6][5] is _____. (VCE–2025) 2M
  2. Define, declare and initialize an array. (CBIT–2025) 5M
  3. Write a program for matrix multiplication. (CBIT–2025, VCE–2025) 5M
  4. Write a C program to search an element in an array using binary search with functions. (CBIT–2025) 5M

Year – 2024


  1. What is an array? (JNTUH–Jan/Feb-2024) 1M
  2. Compare character arrays and string literals. (JNTUH–Jan/Feb-2024) 6M
  3. Explain one-dimensional array initialization. (JNTUH–Jan/Feb-2024) 6M
  4. How are two-dimensional arrays declared and initialized in C? (CBIT–2023, VCE–2024) 5M
  5. Declare a 2D array of double type to store attendance percentage of 13 sections with 65 students and initialize it with zero. (VASAVI–2024) 5M
  6. Define an array. Discuss different ways of initializing one-dimensional arrays with examples. (CBIT–2023, VCE–2024) 5M
  7. Write a C program to find the largest number in an array. (CBIT–2023, VCE–2024) 5M
  8. Write a C program to perform addition of two matrices. (CBIT–2023, VCE–2024) 5M
  9. Write a C program to subtract two square matrices and display the result in matrix format. (VCE–2024) 5M
  10. Explain bubble sort with the help of a suitable example. (VASAVI–2024) 5M
  11. Write a function to accept pointer to an array and its size, and sort the array using selection sort. (VASAVI–2024) 5M

Year – 2023


  1. What is a two-dimensional array? (JNTUH–Sep-2023) 1M
  2. Give syntax for two-dimensional arrays and explain. (JNTUH–Mar/Apr-2023) 5M
  3. Differentiate null-terminated and fixed-length strings. (JNTUH–Sep-2023) 5M
  4. Sort the data PPS, BED, IEE, SPOD, BEM using bubble sort algorithm and show the working. (VASAVI–2023) 5M
Year – 2022
  1. Write a C program to read and display array elements by passing arrays to functions. (CBIT–2022) 5M

STRINGS – Short & Long Answer Questions

Year – 2025


  1. Strings in C are always terminated with a _____ character. (VCE–2025) 2M
  2. Write a C program to check whether the given string is palindrome or not using pointers. (VCE–2025) 5M

Year – 2024


  1. Write any two string handling functions. (CBIT–2023, VCE–2024) 2M
  2. What is the significance of string handling functions in C? (CBIT–2023, VCE–2024) 2M
  3. Explain the working of any five string handling functions in C with examples. (CBIT–2022, VCE–2024) 5M
  4. Explain the significance of different string handling functions. (CBIT–2023, VCE–2024) 5M
  5. Write a C program to check whether a given character is a vowel or not using switch statement. (CBIT–2023, VCE–2024) 5M
  6. Write a C program to accept a string from the command line and display its length. (VASAVI–2024) 5M
  7. Given two strings s1 and s2, write a C program to check whether s2 is a substring of s1 using a user-defined function. (VASAVI–2024) 5M

Year – 2023


  1. Demonstrate about strcpy() function. (JNTUH–Mar/Apr-2023) 1M
  2. Differentiate null-terminated and fixed-length strings. (JNTUH–Sep-2023) 5M
  3. Explain string conversion functions with examples. (JNTUH–Mar/Apr-2023) 5M
  4. Write a C program to find the length of a given string without using strlen(). (CBIT–2023) 5M
  5. Write a C program which reads a string and prints “YES” if all characters are same, otherwise prints “NO”. (CBIT–2023) 5M
  6. What is the difference between a string and a character array in C? Why is '\0' important? (VASAVI–2023) 5M

Year – 2022


  1. Explain the working of any five string handling functions in C with examples. (CBIT–2022) 5M