Programs based on array and strings and basic algorithms.

Here I will give you practice questions based on array and strings. and I will also give you programs based on some algorithms of searching and sorting .


Here are some sample questions and for downloading full pdf you can click on the link.

C program based on Array:-

1. Write a program to count total number of negative elements in an array.

2. Write a program to copy all elements from an array to another array.

3. Write a program to insert an element in an array.

4. Write a program to delete an element from an array at specified position.

5. Write a program to find the duplicate values of an array of integer values.

C-programs based on string:-

1. Write a program to find the length of string.        

2. Write a program to display string from backward.        

3. Write a program to count number of words in string.        

4. Write a program to concatenate one string contents to another.        

5. Write a program to compare two strings they are exact equal or not.     

C-programs based on searching and sorting:-

  1. WAP for linear search in C.

  2. WAP for binary search in C.

  3. WAP for Bubble sort in C.

  4. WAP for insertion sort in C.

  5. WAP for Selection sort in C.MCQS:-

    Based on Array:-

    1) What is an Array in C language.?

    A) A group of elements of same data type.

    B) An array contains more than one element

    C) Array elements are stored in memory in continuous or contiguous locations.

    D) All the above.

    2) Choose a correct statement about C language arrays.

    A) An array address is the address of first element of array itself.

    B) An array size must be declared if not initialized immediately.

    C) Array size is the sum of sizes of all elements of the array.

    D) All the above

    3) What are the Types of Arrays.?

    A) int, long, float, double

    B) struct, enum

    C) char

    D) All the above

    4) An array Index starts with.?

    A) -1

    B) 0

    C) 1

    D) 2

    5) Choose a correct statement about C language arrays.

    A) An array size can not changed once it is created.

    B) Array element value can be changed any number of times

    C) To access Nth element of an array students, use students[n-1] as the starting index is 0.

    D) All the above


practice questions and MCQs :-   

Recommended Post:

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

Key points:-

 MCQs:-

Leave a Reply

Your email address will not be published.