1
Below I have a code
simple in C, the problem is that if I leave as is it does not print the received name on the screen, but when I change the scanf_s
for scanf
it works normally.
What would be the reason ?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
char nome[20];
int ru;
printf("Nome: ");
scanf_s("%s", nome);
printf("\n\n");
printf("%s", nome);
}
San, would this answer help you? (in English) Header for scanf_s Function
– Luiz Augusto
You helped me so much! Thank you so much!!
– San Nunes