Unfortunately, no, there's no modifier like '*' for printf that causes scanf to get its field width or precision from a variable. The closest you can come is dynamically creating the format string:
char format[8];
sprintf(format, "%%%dX", width);
fscanf(in_file, format, &iData);