Шукаєте відповіді та рішення тестів для * Contrôles Continus - P2 - Promo 2029? Перегляньте нашу велику колекцію перевірених відповідей для * Contrôles Continus - P2 - Promo 2029 в moodle.myefrei.fr.
Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!
Dans quel cas l'utilisation d'une liste chaînée simple (un seul pointeur head) est-elle moins efficace qu'un tableau ?
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?
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 ?
?
Quel est le rôle du mot clé struct en langage C ?
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 ?
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 ?
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 ?
touch file.txt sert principalement à :