I want to read an amount of string from the file
Given inputfile.txt
Micheal
Tammy
Alex
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
FILE* input;
char name[100];
char temp[100];
input = fopen("inputfile.txt", "r");
while((fscanf(input,"%c ", &name[i]))==1)
{
printf("%c ", name[i]);
temp[i] = name[i];
i++;
}
}