Document 15702092

advertisement
PRINCESS NORA BINT ABDULRAHMAN UNIVERSITY
College of Computer and Information Sciences
SC 302
Assignment# 1
shell commands in Linux
Homework policy:
1) Copying any part of other people's code, solution sets, or from any other sources is
strictly prohibited.
2) If your source is the web, write your references in details.
3) Code quality (understandable, comments, organization).
4) All programs must compile and execute; programs that do not compile and execute
will receive a grade of zero
.
Due date:19/2/2012 before 9:00
Note: screen shots for each step are required.
1- Use ls command to list the content in the /usr/bin directory (hint: you need
to know how to reach /usr/bin directory from the command line).
2- Write and execute a C language program.
a. Use the nano editor to create a file called "myInfo.c" and write a program that
print your name ,id ,email.
b. Compile using:
gcc –o
c.
myInfo myInfo.c
Run with:
./
myInfo
d. Explain the arguments of the gcc command?
Download