Need help C programs on mac/linux

the below program i need to run on mac/linux terminal

compling gcc




1. write a program in c which recieves a file name on the command line and which statess whether or not the user of the program is in the same group as the owner of the file.

2. write a program in c which recieves a file name on the command line and in the case the file is a directory, states whether or not it contains any visible sub directories.

3. write a program in C which receives a file name on the command line and displays the home directory of the owner of the file.

4. write a program in C which creates two child processes. Each child process should read a character from the keyboard and then write it to a single pipe the parent process should read the characters from the pipe and then state whether or not the characters are the same.
Detailed explanation: NO
Specific requirements:
Library you can use

#include <stdio.h>
#include <string.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <pwd.h>
#include <memory.h>
#include <string.h>
#include<unistd.h>
#include<stdlib.h>
#include <grp.h>
#include <sys/stat.h>

also ftw.h

and any other if u need
Last edited on
Move your topic to Linux programming. You will probably find more help here.

Please note, that it is not a homework site. We won't do your homework for you. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attemts to solve this youself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again. As it is impossible to find deriviative of function without knowledge in ariphmetics, you cannot do more complex tasks in programming without clear understanding of basics
Topic archived. No new replies allowed.