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)

{

  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 ?

View this question
#include <stdio.h>

#include <stdlib.h>

#include <string.h>

void f(int * p, char * s)

{

  *p=3;

  strcpy(s,"TEST");

}

int main(void)

{

  int i;

  char ch[10];

  // appeler la fonction f

  <COMPLETER>

  printf("%d\n",i);

  return(0);

}

Compléter la ligne <COMPLETER>

View this question
#include <stdio.h>

#include <stdlib.h>

void f(int * p)

{

  <COMPLETER>

}

int main(void)

{

  int i;

  // j'affecte la valeur 3 a i

  f(&i);

  printf("%d\n",i);

  return(0);

}

Compléter la ligne <COMPLETER>

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>

void fonction(int a)

{

  a = a + 10;

}

int main(void)

{

  int a = 1234;

  a++;

  fonction(1234);

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

  return 0;

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

void incrementer(int* a)

{

  a++;

}

int main(void)

{

  int a=3;

  int i;

  for (i=1;i<5;i++){

   incrementer(&a);

  }

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

  return(0);

}

Que donne l'exécution de ce programme ?

View this question
#include <stdio.h>

void f(int l,int m , int* n,int *o)

{

  l++;

  m++;

  (*n)++;

  (*o)++;

}

int main()

{

  int i=2,j=3,k=4;

  int *p;

 

  p=&j;

  f(i,j,p,&k);

  printf("%d %d %d %d\n",i,j,k,*p);

  return (0);

}

Que va afficher ou faire ce programme ?

View this question
#include <stdio.h>

void f(char *s)

{

  s[0]=s[1];

  s[1]='O';

}

int main()

{

  char chaine1[3];

  chaine1[0]='O'; chaine1[1]='K';

  chaine1[2]='\0';

  printf("%s -- ",chaine1);

  f(chaine1);

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

  return (0);

}

Que va afficher ou faire ce programme ?

View this question
#include <stdio.h>

void f(char *s)

{

  s[0]=s[1];

  s[1]='O';

}

int main()

{

  char chaine1[2];

  chaine1[0]='O'; chaine1[1]='K';

  chaine1[2]='\0';

  printf("%s -- ",chaine1);

  f(chaine1);

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

  return (0);

}

Que va afficher ou faire ce programme ?

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