Langage c

Bonjour,
j'aimerais convertir un entier en chaine et vice versa

1 réponse

  1. //Include LibC
    #include <stdio.h>
    #include <stdlib.h>

    //Entier
    Int Val=0;
    //Chaîne de caractère
    char buffer[MAZSIZE];

    //Convert to Int
    i=atoi("chaine a convertir");

    //Convert to String
    itoa(i,buffer,10);