#include #include #include main(argc, argv) char *argv[]; { struct stat statb; int a, n, k; int fp_in; char fn_in[30]; if (argc > 1) { printf ("\nfilename is %s", argv[1]); strcat (fn_in, argv[1]); goto skip; } printf ("Enter name of input file: "); gets (fn_in); skip:; fp_in = open (fn_in, 0); if (fp_in < 0) { printf ("\nCan't read file %s\n", fn_in); return; } stat(fn_in, &statb); /* printf ("\nflags = %d", statb.flags); */ printf ("\ninode = %d", statb.st_ino); n = statb.st_mode & 0777; printf ("\nmode is %o", n); printf ("\n"); close(fp_in); }