Add Papers Marked0
Paper checked off!

Marked works

Viewed0

Viewed works

Shopping Cart0
Paper added to shopping cart!

Shopping Cart

Register Now

internet library
Atlants.lv library
FAQ
1,99 € Add to cart
Add to Wish List
Want cheaper?
ID number:813199
 
Author:
Evaluation:
Published: 01.07.2014.
Language: Latvian
Level: College/University
Literature: n/a
References: Not used
Extract

Simb() funkcija.
Funkcija neatgriež vienu vērtību, bet gan atgriež masīvu, tāpēc tā ir void funkcija. Funkcija saņem ievadīto masīvu, sakuma indeksu, virknes garumu.
void simb(char A[], int sakuma,int len){
Izveido pagaidu shar tipa mainīgo:
char temp;
Norāda, ka simbolu virknes pirmais ekements būs vienāds ar temp:
temp=A[sakuma];
Apmaina pirmo elementu ar pēdējo:
A[sakuma] = A[len - sakuma];
A[len - sakuma] = temp;
Norāda, ka, ja masīva pirmā elementa vērtība vienāda ar pusi no virknes garuma, tad jaatgriež nulle:
if (sakuma == len / 2){
return 0;
Visos citos gadījumus ar rekursiju atgriež sakārtoto masīvu.

Author's comment
Load more similar papers

Atlants

Choose Authorization Method

Email & Password

Email & Password

Wrong e-mail adress or password!
Log In

Forgot your password?

Draugiem.pase
Facebook

Not registered yet?

Register and redeem free papers!

To receive free papers from Atlants.com it is necessary to register. It's quick and will only take a few seconds.

If you have already registered, simply to access the free content.

Cancel Register