This shows you the differences between two versions of the page.
alf:res:subiecte [2017/05/18 02:47] alexandru.radovici |
alf:res:subiecte [2017/05/18 02:59] (current) alexandru.radovici |
||
---|---|---|---|
Line 38: | Line 38: | ||
E -> id | E -> id | ||
E -> number | E -> number | ||
+ | </code> | ||
+ | - Ecrivez l'arborescence pour la grammaire et la chaîne suivantes <code>\ | ||
+ | E -> E + E | ||
+ | E -> id | ||
+ | E -> number | ||
+ | (2-4+((5*6)+6))*67*7 | ||
</code> | </code> | ||
- Ecrivez l'AST pour le code source suivant<code> | - Ecrivez l'AST pour le code source suivant<code> | ||
Line 63: | Line 69: | ||
2+3*(6+7) | 2+3*(6+7) | ||
+ | </code> | ||
+ | - Allouert les variables suivantes<code> | ||
+ | struct | ||
+ | { | ||
+ | int n1; | ||
+ | int n2; | ||
+ | int n3; | ||
+ | int f[70] | ||
+ | } s; | ||
+ | |||
+ | s *s1, s2, s3[75], s4; | ||
+ | </code> | ||
+ | - Ecrivez le diagramme de flux de contrôle pour le code source suivant<code> | ||
+ | var s = 0; | ||
+ | while (s<1000) | ||
+ | { | ||
+ | s = s + 1; | ||
+ | if (s%6 == 0) s = s + 4; | ||
+ | else s = s * 3; | ||
+ | } | ||
</code> | </code> |