Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
Solutii - Tehnici Program Are - Adunate

Solutii - Tehnici Program Are - Adunate

Ratings: (0)|Views: 49 |Likes:
Published by ursachem

More info:

Published by: ursachem on Jun 30, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/24/2012

pdf

text

original

 
TEHNICI AVANSATE DE PROGRAMARE
 Exemple de subiecte
1.
a. q, r, p c. r, q, p b. p, q, r d. p, q,
2.
a. Q, R, P c. P, R, Q b. R, Q, P d. P, Q,
3.
a.
Q -> urm -> urm == P
  b.
P -> urm == Q
 c.
P -> urm -> urm == Q
 d.
Q -> urm == P -> urm -> urm 
 
 
4.
a.
P -> urm -> urm == Q -> urm 
 b.
P -> urm -> urm == Q
c.
Q -> urm -> urm -> urm == P -> urm 
 d.
Q -> urm -> urm == P -> urm 
 
5.
a.
P -> URM = Q
  b.
Q -> URM = P
 c.
Q -> URM -> URM = P
 d.
P -> URM -> URM = Q
 
6.
a. c.
 
 b. d.
7.
Intr-o lista simplu inlantuita alocata dinamic fiecare element retine in campul nr un numar intreg siin campul urm adresa urmatorului element din lista. Stiind ca variabila p contine adresa primului element dinlista si variabila t este de acelasi tip cu variabila p, stabiliti care dintre urmatoarele secvente elibereazaintreaga zona de memorie ocupata de elementele listei.a. while(p) {t = p; p = p->urm; free(p);} b. while(p) {t = p; p = p->urm; free(t);}c. while(p) {t=p; t=t->urm; free(t);}d. free(p);
8.
Intr-o lista liniara simplu inlantuita, fiecare element retine in campul urm adresa urmatorului nod dinlista, iar in campul inf un numar intreg. Adresa primului element al listei este retinuta in variabila p. Daca inlista sunt memorate, in aceasta ordine, numerele: 5, 9, 3, si 6 (6 fiind ultimul element), in urma executariisecventei de instructiuni (p indica, initial, nodul cu numarul 5):{ q = p -> urm -> urm; p->urm -> urm = q -> urm; q->urm = p -> urm; p -> urm = q;}in lista vor fi in ordine numerele:a. 9, 5, 3, 6 b. 5, 9, 6, 3c. 5, 3, 6, 9d. 5, 3, 9, 6
9.
O lista liniara simplu inlantuita formata dintr-un numar impar de cel putin 5 noduri are adresa primului nod memorata in variabila prim. In campul urm al fiecarui nod al listei se memoreaza adresaurmatorului element din lista. Adresa carui nod va fi memorata in variabila p, dupa executarea secventei de program:{p = prim; q = prim;while(q->urm) {q = q -> urm -> urm; p = p -> urm;}}a. penultimul nod al listei

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
Druiu Marius liked this
liceulneagoe808 liked this
d_alina19 liked this
maryonea liked this
gefinna liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->