Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

System Programming -Exam One

Total questions: 93

Worksheet time: 2hrs 40mins

Name
Class
Date
1.

What is system programming?

4 lines
2.

Which of the following is Not considered system programming?

a)

Managing system resources

b)

Performing I/O operations

c)

File manipulation

d)

Querying a database

e)

Process control and inter-process communication

3.

Define Managing system resources?

a)

Managing CPU, memory and file systems.

b)

Deals with input/output operations at a low level(working with system calls for reading/ writing files, interacting with devices)

c)

Working with files, using system calls like open(), read(), write(), and close()

d)

Deals with creating, managing, and synchronizing processes using system calls fork(), exec(), and IPC mechanisms.

4.

Define Performing I/O?

a)

Managing CPU, memory and file systems.

b)

Deals with input/output operations at a low level(working with system calls for reading/ writing files, interacting with devices)

c)

Working with files, using system calls like open(), read(), write(), and close()

d)

Deals with creating, managing, and synchronizing processes using system calls fork(), exec(), and IPC mechanisms.

5.

Define File manipulation?

a)

Managing CPU, memory and file systems.

b)

Deals with input/output operations at a low level(working with system calls for reading/ writing files, interacting with devices)

c)

Working with files, using system calls like open(), read(), write(), and close()

d)

Deals with creating, managing, and synchronizing processes using system calls fork(), exec(), and IPC mechanisms.

6.

Define Process control and inter-process communication?

a)

Managing CPU, memory and file systems.

b)

Deals with input/output operations at a low level(working with system calls for reading/ writing files, interacting with devices)

c)

Working with files, using system calls like open(), read(), write(), and close()

d)

Deals with creating, managing, and synchronizing processes using system calls fork(), exec(), and IPC mechanisms.

7.

Which one is TRUE in terms of logical organization of a computer system?

a)

Application programs lie between users and computer hardware.

b)

Operating systems lie between Users and computer hardware.

c)

Users lie between OS and hardware.

d)

OS coordinates between applications and computer hardware.

8.

The Application Programming Interface (API) in the system's logical organization acts as a bridge between application programs and the (a)   .

9.

The kernel is the core component of the operating system that directly manages _________________ and __________________.

a)

Hardware

b)

System resources

c)

User interface

d)

Application Programming Interface

10.

Which component directly interacts with the hardware in the given diagram?

(a)  

11.

Which component manages file-related operations in the system?

a)

File management system

b)

I/O Drivers

c)

Network module

12.

Which component acts as an interface between application programs and the kernel?

a)

User Interface

b)

Application Programming Interface

c)

Network module

d)

File Management System

13.

Which system component is directly responsible for managing hardware resources?

a)

User Interface

b)

Application Programming Interface

c)

Kernel

d)

Application Programming

14.

The user directly interacts with the kernel.

a)

True

b)

False

15.

I/O drivers are part of the hardware layer.

a)

True

b)

False

16.

What is the role of I/O drivers in the system?

4 lines
17.

Write how would you log-in to the snowball server.

4 lines
18.

Order the steps involved in using SFTP to upload files from your local machine to a remote server.

  1. 1. put filename.txt

  2. 2. sftp username@snowball.cs.gsu.edu

  3. 3. exit

  4. 4. cd /path/to/local/directory

    5. ls


a)

2,4,1,5,3

b)

1,2,3,4,5

c)

5,3,4,2,1

d)

3,1,5,2,4

19.

To download a file, use the following command:
sftp> (a)   filename

20.

To download a directory, use the following command:
sftp> get (a)   remote_directory

21.

Which of the following utility commands is used to clear the terminal screen in Unix?

a)

clear

b)

stty

c)

man

d)

date

22.

what does the man utility provide in UNIX?

a)

A way to search for files

b)

A detailed manual page for commands and utilities

c)

A tool to manage network connections

d)

A way to monitor system resources

23.

Which of the following would you type to display the current date and time in the format

a)

date -yymmddhhmm

b)

date

c)

date [yymmddhhmm]

d)

date [yymmddhhmm.ss]

24.

Explain how you would use the man command to get help on a specific utility, like passwd.

4 lines
25.

stty in Linux is a utility that modifies and prints terminal line settings. Please provide an example of a situation where you might use it.

4 lines
26.

To log out of a terminal session, you can either type exit or press CTRL - (a)   .

27.

The (a)   utility can be used to change your password in Unix.

28.

The date utility can be used to change the system date and time.

a)

True

b)

False

29.

The man command can only display manual pages for commands, not for utilities.

a)

True

b)

False

30.

You need to use the stty utility to set up your terminal screen for specific applications.

a)

True

b)

False

31.

What special character erases a character before cursor

a)

CTRL - H

b)

CTRL - W

c)

CTRL - U

d)

CTRL - R

32.

What special character erases a word before cursor

a)

CTRL - H

b)

CTRL - W

c)

CTRL - U

d)

CTRL - R

33.

What special character erases an entire line

a)

CTRL - H

b)

CTRL - W

c)

CTRL - U

d)

CTRL - R

34.

What special character reprints a line

a)

CTRL - H

b)

CTRL - W

c)

CTRL - U

d)

CTRL - R

35.

What special character suspends a running program?

a)

CTRL - C

b)

CTRL - Z

c)

CTRL - S

d)

CTRL - Q

e)

CTRL - D

36.

What special character stops printing to screen?

a)

CTRL - C

b)

CTRL - Z

c)

CTRL - S

d)

CTRL - Q

e)

CTRL - D

37.

which of the following commands is used to list all the files in the current directory?

a)

cat

b)

pwd

c)

ls

d)

head

38.

which of the following commands is used to create a new directory in Unix?

a)

mkdir

b)

rmdir

c)

cd

d)

pwd

39.

Which command allows you to display the first 10lines of a file?

a)

more

b)

head

c)

tail

d)

cat

40.

which command is used to move or rename files in UNIX?

a)

mv

b)

cp

c)

rm

d)

file

41.

To count the number of lines, words, and characters in a file, which command would you use?

a)

wc

b)

cat

c)

more

d)

file

42.

which of the following commands changes the group ownership of a file?

a)

chmod

b)

chgrp

c)

file

d)

groups

43.

The (a)   command is used to show the contents of a file in the terminal, one page at a time.

44.

To remove a files from the system, you would use the (a)   command

45.

The (a)   command allows you to change file permissions in UNIX

46.

If you want to move to the home dirctory, you would use the (a)   command.

47.

The (a)   command shows the full path of the current working directory.

48.

The tail command shows the last 10 lines of a file.

a)

True

b)

False

49.

The vi and emacs commands are used to show file contents in the terminal

a)

True

b)

False

50.

You have a file named report.txt. You want to copy this file to a directory named /backup. What command would you use

4 lines
51.

You want to list all files, including hidden ones, in your current directory. What command should you use?

4 lines
52.

What does the -a option in the ls command do?

a)

Lists only directories

b)

List hidden files and directories

c)

Lists files with long details

d)

Sorts files by date

53.

What is the purpose of the -F option in the ls command?

a)

Shows file sizes in a human-readable format

b)

Adds a character to indicate the file type

c)

Lists files recursively

d)

Displays file permissions

54.

Which option in the ls command will show details of directories but not their contents?

a)

-R

b)

-d

c)

-l

d)

-s

55.

What does the -R option do in the ls command?

a)

Shows disk usage for each file

b)

Lists files recursively, including subdirectories

c)

Shows hidden files

d)

Lists file groups

56.

The ls -algFsdR command does the following:

4 lines
57.

The -g option in the ls command displays the group name of each file without displaying the owner

a)

True

b)

False

58.

The -s option displays the disk usage in blocks for each file

a)

True

b)

False

59.

What does the -l option do in the ls command?

a)

Lists files in long format, showing details like permissions, owner, and size

b)

Lists only hidden files

c)

Lists files in columns

d)

Lists only directories

60.

Is the following path absolute or relative?

(a)  

61.

You are in /home/user/. What relative path would you use to access notes.txt located in /home/user/docs/?

4 lines
62.

You are in /home/user/docs/. What relative path command would you use to move to /home/user/music/?

4 lines
63.

What command takes you back to your home directory from anywhere?

4 lines
64.

What is an absolute pathname?

a)

A path that starts from the current working directory

b)

A path that starts from the root (/) directory

c)

A path that uses .. or . to navigate directories

d)

A path that starts from the root(/) directory

65.

Which of the following is an example of an absolute path?

a)

Test.txt

b)

./Test.txt

c)

/home/csc3320/Test.txt

d)

../../bin/try

66.

What does .. represent in a path?

a)

Current directory

b)

Parent directory

c)

Root directory

d)

hidden directory

67.

What does . represent in a path?

a)

Current directory

b)

Parent directory

c)

Root directory

d)

hidden directory

68.

What does / represent in a path?

a)

Current directory

b)

Parent directory

c)

Root directory

d)

hidden directory

69.

What does the r permission represent?

a)

Read

b)

Write

c)

Execute

d)

No Permission

70.

What does the w permission represent?

a)

Read

b)

Write

c)

Execute

d)

No Permission

71.

What does the x permission represent?

a)

Read

b)

Write

c)

Execute

d)

No Permission

72.

What does the - permission represent?

a)

Read

b)

Write

c)

Execute

d)

No Permission

73.

If the permissions of a file are rwxr-xr--, what is the octal representation?

a)

754

b)

744

c)

775

d)

777

74.

If the permissions of a file.txt is rwxr-xr-- and you want to give execute permission to other what command would you use?

4 lines
75.

Explain what the permission string rwxr--r-- means for a file. Who has access and what are they allowed to do?

4 lines
76.

What command will you use to move the cursor to the begining of the current line in vi

a)

0

b)

^

c)

G

d)

H

77.

In vi, how do you delete a word?

a)

d

b)

dw

c)

dd

d)

d2w

78.

Which command writes changes to a file and exits the Vi editor?

a)

:w

b)

:q

c)

:wq

d)

:x

79.

Explain the difference between the :q and :wq commands in vi.

4 lines
80.

You want to replace all occurrences of the word "apple" with "Orange" in the current file. What vi command would you use?

4 lines
81.

The command to copy (yank) a line in Vi is (a)   .

82.

To move the cursor to the next occurrence of a word in Vi, you would use the command (a)   .

83.

In vi, the regular expression ^abc matches any line that starts with (a)   .

84.

The command dd deletes an entire line in vi

a)

True

b)

False

85.

In Vi, the + symbol in a regular expression matches the previous character one or more times.

a)

True

b)

False

86.

Which of the following regular expressions correctly matches a phone number in the format ###-###-####?

a)

\d{3}\s\d{3}\s\d{4}

b)

\d{3}-\d{3}-\d{4}

c)

\d{3}.\d{3}.\d{4}

d)

\d{10}

87.

Which of the following regular expressions correctly matches a date in the format MM/DD/YYYY?

a)

\d{2}/\d{2}/\d{4}

b)

(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{4}

c)

\d{1,2}/\d{1,2}/\d{4}

d)

[0-9]{2}/[0-9]{2}/[0-9]{4}

88.

Which of the following passwords would be matched by the regex (?=.*[a-z])(?=.*[A-Z])(?=.*\d).+?

a)

password

b)

PAASWORD

c)

Password1

d)

123456

89.

Which strings match the regex (a(bc)+de)?

a)

abcde

b)

ade

c)

abcbcde

d)

abc

90.

Which strings match the regex [a-z\s]*hello?

a)

Othello

b)

hello

c)

2hello

d)

say hello

91.

An email address (Format: username@domain.com, where the username consists of letters, digits, underscores, or dots, and the domain consists of letters and dots).

4 lines
92.

Write names of five system calls.

4 lines
93.

What is an application programming interface (API)?

4 lines