#include "header.h" int ScanFunc(int n) { char Format[20]; int w; for(w=0;w<20;w++) { uc[w]=0; } sprintf(Format, "%%%dc", NMax); //formats the scanf as "%10c" if(scanf(Format,uc)>0) //scans the batch of 20 and puts them in the vector uc { n=strlen(uc); //finds the length of uc return n; } else { return 0; } }