Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more ➡
Standard view
Full view
of .
×
0 of .
Results for:
P. 1
programarea calculatoarelor. algoritmi in programare

# programarea calculatoarelor. algoritmi in programare

Ratings:

4.0

(1)
|Views: 9,917|Likes:

### Availability:

See More
See less

08/02/2013

pdf

text

original

Cuprins
1. Tipuri dinamice de date. Pointeri......................................................................
3
2. Subprograme..........................................................................................................
13
3. Subprograme recursive.......................................................................................
30
4. Tipul de dat\u0103 ARTICOL......................................................................................
44
5. Fi\u015fiere de date......................................................................................................
52
6. Algoritmi de prelucrare a fi\u015fierelor binare...................................................
72
7. Structuri dinamice de date. Liste....................................................................

110 8. Grafuri.................................................................................................................... 122 9. Structuri arborescente...................................................................................... 160 10. Elemente de programare orientat\u0103 obiect................................................... 186 Bibliografie................................................................................................................. 212

1 Tipuri dinamice de date. Pointeri
Pointerul este un tip de dat\u0103 predefinit, care are ca valoare adresa unei
zone de memorie (figura 1.1).
Pointer
Zona de memorie indicat\u0103 de pointer
Memoria intern\u0103
Segment:offset
Figura 1.1 Un pointer este adresa unei alte zone de memorie
Folosirea pointerilor prezint\u0103 urm\u0103toarele avantaje:
\u2022\u00eenlocuirea expresiilor cu indici \u2013 \u00eenmul\u0163irile din formula de calcul al
rangului se transform\u0103 \u00een adun\u0103ri\u015fi deplas\u0103ri;

\u2022posibilitatea aloc\u0103rii dinamice a memoriei;
\u2022folosirea tipurilor procedurale de date;

\u00cen opera\u0163iile cu pointeri se folosesc urm\u0103torii operatori specifici:
Operatori
Simbol
Utilizare
Operator der ef e re n\u0163iere
*
tip*
Operator der ef e re n\u0163iere
&
&nume
Operator dedereferen\u0163i e re
*
*nume
*
\u21d2define\u015fte un nou tip de dat\u0103 (pointer latip);
&
\u21d2extrage adresa unei variabile (creeaz\u0103 o referin\u0163\u0103);
*
\u21d2acceseaz\u0103 con\u0163inutul zonei de memorie indicate de pointer.
Cei doi operatori au efect invers: *&nume\ue000 nume.
Exemplu:*&nume reprezint\u0103 valoarea de la adresa variabilei nume(valoarea
variabileinu me).
3

## Activity (106)

### Showing

AllMost RecentReviewsAll NotesLikes