logo

Crowdly

Browser

Add to Chrome

CC - P1 - Promo 2029

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!

Une fonction t_circle * create_circle(int a, int b, int r) alloue dynamiquement de la mémoire pour stocker un t_circle. Elle alloue et initialise son champ center avec l'appel de la fonction create_point(a, b). Et initialise également son champ radius avec la valeur r.

On considère ensuite l'instruction suivante :

t_circle * c = create_circle(1, 2, 3);

Parmi les suite d'instructions suivantes, laquelle permet de libérer toute la mémoire allouée par create_circle ?

0%
0%
0%
0%
View this question

A function print_circle outputs informations of a circle of type t_circle : its center's coordinates and the value of its radius. Select the correct definition for this function.

0%
0%
0%
View this question

We would like to write a function that updates the coordinates of a t_point. Among the following prototypes which one matches this need ?

0%
0%
0%
0%
View this question

A function t_circle * create_circle(int a, int b, int r) dynamically allocates memory to store a t_circle. It allocates and initializes its center field with the call to the function create_point(a, b). It also initializes its radius field with the value r.

We then consider the following statement:

t_circle * c = create_circle(1, 2, 3);

Among the following statements, which one allows us to free all the memory allocated by create_circle?

View this question

The following function dynamically allocates memory to store a t_point.

t_point * create_point(int a, int b) {

t_point * p = (t_point *)malloc(sizeof(t_point));

p->x = a;

p->y = b;

return p;

}

Among the following values, which ones are stored in the heap?

0%
0%
0%
0%
View this question

Consider the structured type t_circle defined by

typedef struct s_circle {

t_point * center;

int radius;

} t_circle;

Among the following statements, which ones are correct?

0%
0%
0%
0%
View this question

La fonction suivante alloue dynamiquement de la mémoire pour stocker un t_point.

t_point * create_point(int a, int b) {

t_point * p = (t_point *)malloc(sizeof(t_point));

p->x = a;

p->y = b;

return p;

}

Parmi les valeurs suivantes, lesquelles sont stockées dans tas?

View this question

We would like to define a structured type t_point that represents a point with integer coordinates in the plane. Among the following definitions, which one does not allow us to define this type?

0%
0%
0%
View this question

On considère le type structuré t_circle définit par

typedef struct s_circle {

t_point * center;

int radius;

} t_circle;

Parmi les propositions suivantes, lesquelles sont correctes ?

11%
View this question

On souhaite définir un type structuré t_point qui représente un point à coordonnées entière dans le plan. Parmi les définitions suivantes, laquelle ne permet pas de définir ce type ?

View this question

Want instant access to all verified answers on moodle.myefrei.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome