Looking for CC - P1 - Promo 2029 test answers and solutions? Browse our comprehensive collection of verified answers for CC - P1 - Promo 2029 at moodle.myefrei.fr.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Suppose .
Rewrite this equation using only NAND gates.
Soit .
Réécrire cette équation en utilisant que des portes NAND.
Soit .
Quelle est la forme de cette équation ?
Suppose .
What form does this equation take?
We would like to sort an array of squares based on their area using the insertion sort algorithm as described in the course. Assuming you have the function arrint compare_squares(t_square sq1, t_square sq2) described earlier that compares two squares sq1 and sq2 based on their area, under what condition should we swap the squares arr[j] and arr[j-1] ?
A function int area(t_square sq) that computes the area of the square sq is given.
We would like to define a function int compare_squares(t_square sq1, t_square sq2) that compares two squares sq1 and sq2 based on their area. It returns a negative integer if sq1 has a smaller area than sq2, a positive integer if sq1 has a larger area than sq2, and 0 if both squares have the same area.
Among the following definitions, which one is correct ?
Consider the following sequence of instructions :
t_square ** squares = (t_square **)malloc(10 * sizeof(t_square *));
for (int i = 0; i < 10; i++) {
squares[i] = create_square(0 , i + 1, i + 1);
}
Among the following statements, which ones are true ?
The print_square function displays the information of a square of type t_square: the coordinates of its top left corner and its side. Among the following definitions, which one is correct ?
On souhaite trier un tableau de carrés en fonction de leur aire avec l'algorithme du tri par insertion telle qu'il est décrit dans le cours. En supposant que vous disposez de la fonction tabint compare_squares(t_square sq1, t_square sq2) décrite précédemment qui compare deux carrés sq1 et sq2 en fonction de leur aire, à quelle condition doit-on échanger les carrés tab[j] et tab[j-1] ?
Une fonction int area(t_square sq) qui calcule l'aire du carré sq vous est donnée.
On souhaite écrire une fonction int compare_squares(t_square sq1, t_square sq2) qui compare deux carrés sq1 et sq2 en fonction de leur aire. Elle renvoie un entier négatif si sq1 a une aire plus petite que sq2, un entier positif si sq1 a une aire plus grande que sq2 et 0 si les deux carrés ont la même aire.
Parmi les définitions suivantes, laquelle est correcte ?