Linux Programming Sample Test Questions

Part A

01.

a) What is a Thread?

b) What is File Locking? What are different types of locks?

c) Explain the syntax of getpwuid and getpwnam.

d) What is the purpose of a manual page?

e) Define Process?

02.

a) What is the difference between localtime and gmtime functions? Explain with example.

b} How pipes and redirection symbois work? Demonstrate with the help of examples.

c) How are devices represented in L1NUX? Give an example.

Part B

03.

(I) Create a user with its base directory Imyhome, home directory Istudent, date of expiration of account
to be 31st December 2012. 

(II) Change group id of group to 699 and name to Ipu.

(III) Differentiate between absolute path and relative path.

04. Write a program for locking regions of the file so that particular section of the file is locked but other programs may access other parts offile. 

05. 

(a) Describe the process structure of a process in detail giving explanation about each of its component.

(b) Write a program to demonstrate dynamic memory allocation.

06. Explain the following commands for managing source files:

(a) res
(b) Ci
(c) Co 

Part C

07. Write a program to create a thread in a process. The process should pass an argument to the thread and want till the thread gets executed. 

08. Write a C program to print the following information:

- System name, 
- Host name, 
- Node name, 
- Hardware type of a system, 
- User name, 
- User home directory,
- User shell and, 
- Group id.

09. Write a program using system calls which copies the contents of file.in in file.out file.

Linux Tips

See Also
Red Hat Certified Technician Questions

Have a Linux Problem
Linux Forum - Do you have a Linux Question?

Linux Books
Linux Certification, System Administration, Programming, Networking Books

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.