All pastes #158839 Raw Edit

Miscellany

public c v1 · immutable
·published 2006-09-02 11:00 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include <string.h>long tailleChaine(const char* chaine);int main(int argc, char **argv){  char chaine[1000];  long longueur = 0;  printf("Entrez un mot au hasard\n");  scanf("%s", &chaine);  longueur = tailleChaine(chaine);  printf("Votre mot %s fait %ld lettres de long\n", chaine, longueur);  return 0;}long tailleChaine(const char* chaine){  long nbreLettre = 0;  char nbreActuel = 0;    while(chaine[nbreLettre] != '\0')      {         nbreActuel = chaine[nbreLettre];         nbreLettre++;      }  return nbreLettre;}