Starting Vocational Training From 1-May-2024 Get Detail


C language

Array in C language
1.

Array insertion, deletion and traversing at runtime.


Solution
2.

C program to transpose a matrix


Solution
3.

C Program to print lower diagonal of a matrix


Solution
4.

C program to find multiplication of two matrices


Solution
5.

C program to find sum and subtraction of two matrices


Solution
6.

C Program to read and print a RxC Matrix, R and C must be input by User


Solution
7.

 Write a program in C to count a total number of duplicate elements in 
an array. 
Test Data : 
Input the number of elements to be stored in the array :3 
Input 3 elements in the array : 
element - 0 : 5 
element - 1 : 1 
element - 2 : 1 
Expected Output : 
Total number of duplicate elements found in the array is : 1 


Solution
8.

Write a program in C to copy the elements one array into another 
array. 
Test Data : 
Input the number of elements to be stored in the array :3 
Input 3 elements in the array : 
element - 0 : 15 
element - 1 : 10 
element - 2 : 12 
Expected Output : 
The elements stored in the first array are : 
15 10 12 
The elements copied into the second array are : 
15 10 12 


Solution
9.

Write a program in C to find the sum of all elements of the array. 
Test Data : 
Input the number of elements to be stored in the array :3 
Input 3 elements in the array : 
element - 0 : 2 
element - 1 : 5 

element - 2 : 8 
Expected Output : 
Sum of all elements stored in the array is : 15 


Solution
10.

Write a program in C to read n number of values in an array and 
display it in reverse order. 
Test Data : 
Input the number of elements to store in the array :3 
Input 3 number of elements in the array : 
element - 0 : 2 
element - 1 : 5 
element - 2 : 7 
Expected Output : 
The values store into the array are : 
2 5 7 
The values store into the array in reverse are : 
7 5 2 


Solution
11.

Write a program in C to store elements in an array and print it. 
Test Data : 
Input 10 elements in the array : 
element - 0 : 1 
element - 1 : 1 
element - 2 : 2 
....... 
Expected Output : 
Elements in array are: 1 1 2 3 4 5 6 7 8 9 


Solution