0% found this document useful (0 votes)
4 views2 pages

Practice Question

Uploaded by

ajoantony2021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Practice Question

Uploaded by

ajoantony2021
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1.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

2.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 :

257

The values store into the array in reverse are :

752
3.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

You might also like