Beecrowd 1175 – Array change I Solution

Beecrowd 1175 – Array change I Solution

Array change I

URI 1175 Array change I


Write a program that reads an array N [20]. After, change the first element by the last, the second element by the penultimate, etc., until changing the 10th to the 11th. Print the modified array.


The input contains 20 integer numbers, positive or negative.


For each position of the array N print “N[i] = Y”, where i is the array position and Y is the number stored in that position after the modifications.

Beecrowd 1175 - Array change I

Beecrowd 1175 – Array change I solution in C

int main() {
 int N[20],i,temp=0;


    printf("N[%d] = %d\n",i,N[i]);

    return 0;


In this program, we first declare an integer array N of size 20 and also declare three integer variables i, j, and temp. We use a for loop to take input from the user for the array N.

Next, we use another for loop to swap the values of the array elements. In each iteration, we take the ith element and the jth element and swap their values. We use a temporary variable temp to store the value of the ith element before swapping. We start swapping from the beginning and end of the array and move towards the middle until we reach the 10th and 11th elements.

Finally, we use another for loop to print the modified array. We print each element of the array using the printf function.

This solution uses basic array manipulation and should be easy to understand.

BEECROWD Problems Solution

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
NEW TOXIC ROCKET CYCLE DECK in Clash Royale 2023 Best Deck in Clash Royale Best Deck for Arena 8 in Clash Royale Best Hog deck for Pro players Best Clash Royale Deck