logo

Crowdly

Browser

Додати до Chrome

langage C

Шукаєте відповіді та рішення тестів для langage C? Перегляньте нашу велику колекцію перевірених відповідей для langage C в moodle.insa-toulouse.fr.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

#include <stdio.h>

typedef struct t {

  int efface;

  char tab[4];

}tab;

void effacer (tab* tableau){

  tableau.efface=1;

}

int main(void){

  int i;

  tab tableau;

  tableau.efface=0;

  for (i=0;i<3;i++)

    tableau.tab[i]='a';

  tableau.tab[3]='\0';

  effacer(&tableau);

  if (tableau.efface)

    printf("le tab est efface\n");

  else

    printf("le tab contient : %s\n",tableau.tab);

  return (0);

}

Que donne l'exécution de ce programme ?

Переглянути це питання
#include <stdio.h>

#include <string.h>

struct joueur {

char nom [20];

int classement;

float gain;

};

int main (void)

{

  struct joueur Bruel;

  strcpy(Bruel->nom,"Patrick");

  Bruel.classement=1;

  Bruel.gain=100000;

  printf("%s, %d, %f",

            Bruel->nom,Bruel->classement,Bruel->gain);

  return(0);

}

Que donne l'exécution de ce programme ?

Переглянути це питання
#include <stdio.h>

typedef struct t {

  int efface;

  char tab[4];

}tab;

void effacer (tab* tableau){

  tableau->efface=1;

}

int main(void){

  int i;

  tab tableau;

  tableau.efface=0;

  for (i=0;i<3;i++)

    tableau.tab[i]='a';

  tableau.tab[3]='\0';

  effacer(&tableau);

  if (tableau.efface)

    printf("le tab est efface\n");

  else

    printf("le tab contient : %s\n",tableau.tab);

  return (0);

}

Que donne l'exécution de ce programme ?

Переглянути це питання
#include <stdio.h>

#include <string.h>

#define MAX 10

struct S {

  int i;

  char ch[MAX];

};

void f(struct S * p)

{

  p->i=3;

  strcpy(p->ch,"oula");

}

int main(void)

{

  struct S s1;

  <COMPLETER>

  return (0);

}

Compléter la ligne <COMPLETER>

Переглянути це питання
#include <stdio.h>

int main() {

  struct S {

    int a;

    int b;

    char c[20];

  } *Y;

  struct S Z [2] =

  {

    {2,0,"MdC"},

    {3,7,"CdR"}

  };

  Y = &Z[0];

  *Y = {3, 1, "DdR"};

  Z[0].a += Z[1].b;

  Z[0].b += Z[1].a;

  printf("%d %d %s : %d %d %s\n",

              Z[0].a, Z[0].b, Z[0].c, Z[1].a,Z[1].b, Z[1].c);

  return 0;

}

Que donne l'exécution de ce programme ?

0%
0%
0%
0%
0%
0%
0%
Переглянути це питання
#include <stdio.h>

#include <string.h>

#include <stdlib.h>

int main(void) {

  struct MonStruct {

    int n;

    char * ch;

  };

  struct MonStruct * a;

  a = malloc(sizeof(struct MonStruct));

  a->n = 30;

  a->ch = malloc(strlen("abcabc")+1);

  strcpy(a->ch, "abcabc");

  printf("%d ", a->n);

  printf("%s \n", a->ch);

  return (0);

}

Qu'affiche le programme ?

Переглянути це питання
#include <stdio.h>

#include <string.h>

#define MAX 10

struct S {

  int i;

  char ch[MAX];

};

int main(void)

{

  struct S s1;

  struct S * p;

  p=&s1;

  <COMPLETER>

  return (0);

}

Compléter la ligne <COMPLETER>

0%
Переглянути це питання
#include <stdio.h>

struct Chien

{

  char modele[10];

  int  tailleTruffe;

};

int main()

{

  struct Chien toutou = {"Lupus",4};

  printf("Chien : %s - %d\n",/* A COMPLETER */);

  return 0;

}

Compléter le programme

Переглянути це питання
#include <stdio.h>

#define MAX 10

struct S1 {

  int i;

  int j;

};

struct S2 {

  int i;

  struct S1 v;

};

void f(struct S2 * p)

{

  <COMPLETER>

}

int main(void)

{

  struct S2 s2;

  f(&s2);

  return (0);

}

Compléter la ligne <COMPLETER>

Переглянути це питання
#include <stdio.h>

void affiche(struct t var)

{

  printf("%d %c %f\n", var.i, var.c, var.f);

}

int main(void)

{

  struct t{

    int i;

    char c;

    float f;

  };

  struct t var;

  var.i = 10;

  var.c = 'b';

  var.f = 4.5;

  affiche(var);

  return 0;

}

Que donne l'exécution de ce programme ?

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.insa-toulouse.fr?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome