logo

Crowdly

Browser

Add to Chrome

langage C

Looking for langage C test answers and solutions? Browse our comprehensive collection of verified answers for langage C at moodle.insa-toulouse.fr.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

#include <stdio.h>

/* Le charactere ASCII 65 est un A majuscule, le 66 un B, etc...*/

int main (void)

{

  int i;

  char *pchar;

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

  {

    pchar[i]=(i+65);

  }

  pchar[7]='\0';

  printf("%s",pchar);

  return (0);

}

Que donne l'exécution de ce programme ?

0%
0%
0%
0%
0%
0%
0%
View this question
#include <stdio.h>

#include <stdlib.h>

int main(void)

{

  char ch[]="OULA";

  ch[1]='Z';

  printf("%s\n",ch);

  return 0;

}

Que va afficher le programme ?

View this question
#include <stdio.h>

#include <stdlib.h>

int main()

{

  char *chaine1;

  char *chaine2;

 

  chaine1=malloc (sizeof(char)*3);

  chaine2=chaine1;

  chaine1[0]='O';

  chaine1[1]='\0';

  chaine2[1]='K';

  chaine2[2]='\0';

  printf("%s -- %s\n",chaine1, chaine2);

  return (0);

}

Que va afficher ou faire ce programme ?

View this question
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main(void)

{

  char * ch;

//  <COMPLETER>

  strcpy(ch,"OULA");

  printf("%s\n",ch);

  return 0;

}

Compléter la ligne <COMPLETER>

View this question
#include <stdio.h>

/* Le charactere ASCII 65 est un A majuscule, le 66 un B, etc...*/

int main (void)

{

  int i;

  char pchar [10];

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

  {

    pchar[i]=(i+65);

  }

  pchar[9]='\0';

  printf("%s",pchar);

  return (0);

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

int main(void)

{

  char tab[4];

  tab[0] = '\0';

  tab[1] = 'a';

  tab[2] = 'l';

  tab[3] = 'l';

  printf("tab = %s\n", tab);

  return 0;

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

#include <stdlib.h>

int main(void)

{

  char ch[]="OULA";

  char * ch2;

  ch[1]='T';

  ch2=ch;

  ch2[2]='S';

  printf("%s\n",ch2);

  return 0;

}

View this question
#include <stdio.h>

/* Le charactere ASCII 65 est un A majuscule, le 66 un B, etc...*/

int main (void)

{

  int i;

  char pchar[10];

       

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

  {

    pchar[i]=(i+65);

  }

  pchar[7]='\0';

  printf("%s",pchar);

  return (0);

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

#include <stdlib.h>

int main(void)

{

  char tab[5] = "allo";

  char *ptr_tab = tab;

  ptr_tab = (char *) malloc(5);

  printf("tab = %s\n", ptr_tab);

  return 0;

}

Que donne l'exécution de ce programme ?

View this question
#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 ?

0%
0%
0%
0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.insa-toulouse.fr?

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

Browser

Add to Chrome