tempS = z[i].surname;
z[i].surname = z[i + 1].surname;
z[i + 1].surname = tempS;
tempG = z[i].gr;
z[i].gr = z[i + 1].gr;
z[i + 1].gr = tempG;
temp1 = z[i].ex1;
z[i].ex1 = z[i + 1].ex1;
z[i + 1].ex1 = temp1;
temp2 = z[i].ex2;
z[i].ex2 = z[i + 1].ex2;
z[i + 1].ex2 = temp2;
temp3 = z[i].ex3;
z[i].ex3 = z[i + 1].ex3;
z[i + 1].ex3 = temp3;
tempSr = z[i].sr;
z[i].sr = z[i + 1].sr;
z[i + 1].sr = tempSr;
temp = z[i];
z[i] = z[i + 1];
z[i + 1] = temp;
#include <iostream>
#include <string>
using namespace std;
struct autom {
bool so;
};
void func_init(struct autom arr[], const int v) {
for (int i = 0; i < v; i++) {
arr[i].so = false;
}
}
int main() {
const int v = 10;
autom mas[v];
func_init(mas, v);
for (int i = 0; i < v; i++) {
cout << mas[i].so;
}
}