Stuff
public cpp v1 · immutable#include <stdio.h>#include <stdlib.h>#include <string.h>int main(){ int Nb; char* mot1="salut!!"; printf("mot 1 : %s\n", mot1); Nb = strlen(mot1); printf("Nb de lettre : %d\n", Nb); char* mot2 = (char*)malloc(Nb+1); strncpy(mot2, mot1, 3); printf("mot 1 : %s et mot 2 : %s\n", mot1, mot2); system("PAUSE"); return 0;}s un int ?