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>

void fonction (int *p1, int *p2)

{

  *p1=2;

  *p2=5;

}

int main (void)

{

  int a=5;

  int b=2;

  fonction (&a, &b);

  printf("%d %d",a,b);

  return (0);

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

void fonction(int *a)

{

  *a = *a + 10;

}

int main(void)

{

  int a = 1234;

  int *ptr_a;

  ptr_a = &a;

  a++;

  fonction(&a);

  a++;

  printf("a = %d\n", a);

  return 0;

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

void fonction (int p1, int p2)

{

  int tempo;

  tempo=p1;

  p1=p2;

  p2=tempo;

}

int main (void)

{

  int a=5;

  int b=2;

  fonction (&a, &b);

  printf("%d %d",a,b);

  return (0);

}

Que donne l'exécution de ce programme ?

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

int main(void)

{

  char tab[4];

  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()

{

  char chaine1[2];

  char *chaine2;

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

  chaine2=chaine1;

  chaine2[0]='O';

  chaine2[1]='K';

  chaine2[2]='\0';

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

  return (0);

}

Que va afficher ou faire ce programme ?

0%
0%
0%
0%
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[5];

  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%
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);

  }

  printf("%s",pchar);

  return (0);

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

int main(void)

{

  char ch[5];

  char * ch2;

// <COMPLETER>

  strcpy(ch2,"OULA");

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

  return 0;

}

View this question
#include <stdio.h>

#include <stdlib.h>

int main()

{

  char chaine1[3];

  char *chaine2;

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

  chaine2=chaine1;

  chaine1[0]='O';

  chaine1[1]='K';

  chaine1[2]='\0';

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

  free(chaine1);

  return (0);

}

Que va afficher ou faire ce programme ?

View this question
#include <stdio.h>

int main(void)

{

  char tab[4];

  tab[0] = 'a';

  tab[1] = 'l';

  tab[2] = 'l';

  tab[3] = 'o';

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

  return 0;

}

Que donne l'exécution de ce programme ?

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