How do I store more than one name in a variable of type char , why put it, let's assume name [20] , I'm defining that it has received 20 characters, not that it can receive 20 elements, the code I'm trying to test, that's it here.
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
int i;
float tvendas[10], pvendas[10];
char nome[15];
int main(void){
setlocale(LC_ALL, "Portuguese");
for(i=0; i<=9; i++)
{
printf("%d° VENDEDOR | DIGITE O TOTAL DE VENDAS: R$ ", i+1);
scanf("%f", &tvendas[i]);
printf("%d° VENDEDOR | DIGITE O PERCENTUAL DE AUMENTO DAS VENDAS: ", i+1);
scanf("%f", &pvendas[i]);
printf("%d° VENDEDOR | DIGITE O NOME: ", i+1);
scanf("%s", nome[i]); // MEU PROBLEMA É AQUI
}
for(i=0; i<=9; i++){
printf("TESTE %s\n", nome[i]); //TESTANDO PARA VER SE OS NOMES APARECEM.
}
return 0;
}