C program that takes one or more file or directory names as command line input and reports the following information on the file: i)File type ii)Number of links iii)Read, write and execute permissions iv)Time of last access

#include #include #include #include #include void main() { int fd; struct stat buf; fd=open("f5.txt",O_RDONLY|O_CREAT,600); if(fd!=-1) { if(fstat(fd,&buf)==0) { printf("mode of fileis %u",buf.st_mode); printf("n size of the file is %u",buf.st_size); printf("n…

Continue ReadingC program that takes one or more file or directory names as command line input and reports the following information on the file: i)File type ii)Number of links iii)Read, write and execute permissions iv)Time of last access

Program to Convert the BNF rules into Yacc form and write code to generate Abstract Syntax Tree

ALGORITHM:1. Start 2. Include the header file.3. In int code.l,declare the variable lie no as integer and assign it to be equal to ‘1’.4. Start the int code.l with declarative section.5.…

Continue ReadingProgram to Convert the BNF rules into Yacc form and write code to generate Abstract Syntax Tree