logo

Crowdly

Browser

Add to Chrome

* Contrôles Continus - P2 - Promo 2029

Looking for * Contrôles Continus - P2 - Promo 2029 test answers and solutions? Browse our comprehensive collection of verified answers for * Contrôles Continus - P2 - 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!

By calling the following function, you can initialise an empty list in the main program :

void createEmptyList(t_list *ptr_list)

{

  ptr_list->head = NULL;

}

0%
0%
View this question

When is the use of a simple linked list (a single head pointer) less efficient than an array ?

View this question

En appelent la fonction suivante, on peut initialiser une liste vide dans le programme principal :

void createEmptyList(t_list *ptr_list)

{

  ptr_list->head = NULL;

}

0%
0%
View this question

Dans quel cas l'utilisation d'une liste chaînée simple (un seul pointeur head) est-elle moins efficace qu'un tableau ?

0%
0%
0%
0%
View this question

Consider the following program, using a pointer to a cell (assume that the type t_cell is well defined)

#include <stdio.h>

#include <stdlib.h>

#include "cell.h"

int main()

{

t_cell *ptr;

ptr = (t_cell *)malloc(sizeof(t_cell));

ptr->value = 64738;

printf("%d\n",ptr->value);
    ptr->next = NULL;

printf("%x\n", ptr->next); // display in hexadecimal, any value

printf("%d\n",ptr->next->value);

return 0;

}
What output does this program provide?

View this question

Soit le programme suivant, utilisant un pointeur vers une cellule (on considère que le type t_cell est bien défini)

#include <stdio.h>

#include <stdlib.h>

#include "cell.h"

int main()

{

t_cell *ptr;

ptr = (t_cell *)malloc(sizeof(t_cell));

ptr->value = 64738;

printf("%d\n",ptr->value);
    ptr->next = NULL;

printf("%x\n", ptr->next); // affichage en hexadécimal, une valeur quelconque

printf("%d\n",ptr->next->value);

return 0;

}

Quelle sortie fournit ce programme ?

0%
0%
0%
View this question
Consider the following piece of programming :

t_list mylist;

// the list is initialized and contains at least one cell 

We want to access the value stored in the first cell: what should we write to access this value? ?

0%
0%
0%
0%
View this question
What is the role of the struct keyword in the C language? 

?

View this question

Quel est le rôle du mot clé struct en langage C ?

View this question

Soient les fonctions suivantes :

void fonction1(t_cell *ptr_c)

{

    if (ptr_c != NULL)

    {

    fonction1(ptr_c->next);

    printf("%d ", ptr_c->value);

   }

}

void fonction2(t_list mylist)

{

fonction1(mylist.head);

}

Quelle est l'affichage obtenu si on appelle la fonction2 sur la liste suivante ?

0%
100%
0%
0%
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