#include<stdio.h> #include<conio.h> #include<string.h> int temp1[3][3]; void main() { char ch[4]; FILE *fin; int i,j; int n; clrscr(); fin=fopen("input.in","rb"); fscanf(fin,"%d",&n); printf("%d\n",n); for(j=0;j<n;j++) { fscanf(fin,"%s",ch); strcpy(temp1[j],ch); } printf("%c",temp1[2][2]); getch(); }
Quote:strcpy(temp1[j],ch);
C
fopen
scanf
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)