C: Concaténer n caractères de ‘str2’ avec ‘str1’

Author:


Download

  #include 
  #include 

  int main(void)
  {
	char str1[128]="J'aime ";
	char str2[128]="aprendre C/C++";

	//Ajouter 8 caractère de 'str2' à la fin de 'str1'
	strncat(str1, str2,8);

    printf(str1);

    return 0;
  }

/*
J'aime apprendre
*/ 

Leave a Reply

Your email address will not be published. Required fields are marked *

C: Concaténer n caractères de ‘str2’ avec ‘str1’

Author:


Download

  #include 
  #include 

  int main(void)
  {
	char str1[128]="J'aime ";
	char str2[128]="aprendre C/C++";

	//Ajouter 8 caractère de 'str2' à la fin de 'str1'
	strncat(str1, str2,8);

    printf(str1);

    return 0;
  }

/*
J'aime apprendre
*/ 

Leave a Reply

Your email address will not be published. Required fields are marked *

C: Concaténer n caractères de ‘str2’ avec ‘str1’

Author:


Download

  #include 
  #include 

  int main(void)
  {
	char str1[128]="J'aime ";
	char str2[128]="aprendre C/C++";

	//Ajouter 8 caractère de 'str2' à la fin de 'str1'
	strncat(str1, str2,8);

    printf(str1);

    return 0;
  }

/*
J'aime apprendre
*/ 

Leave a Reply

Your email address will not be published. Required fields are marked *