CSCI330_All_Quizzes

pdf

School

Northern Illinois University *

*We aren’t endorsed by this school

Course

330

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

26

Uploaded by ElderCrown6684

Report
CSCI330 Quizzes 1 CSCI330 Quizzes QUIZ 1 1. According to distrowatch.com page hit ranking Mint is the most popular distribution. FALSE Rank Distribution HPD* 1 MX Linux 2701 2 Mint 2081 3 EndeavourOS 1998 4 Debian 1427 2. You can access the NIU Blackboard website from within Linux running as a virtual machine. TRUE 3. C is the only programming language available on Linux FALSE 4. Which is the most widely used operating system today? Linux 5. Which of the following statements are true about UNIX a. UNIX is older than Microsoft Windows. b. UNIX is a multi-user multi-tasking operating system. c. UNIX powers many of the e-commerce servers in the world. d. UNIX was developed at Bell Laboratories. ALL ARE TRUE ABOUT UNIX 6. What is the password for performing administrative duties in our personal Linux
CSCI330 Quizzes 2 student 7. Which company makes the VirtualBox software? Oracle 8. A guest Linux virtual machine can use more memory than the host operating system has. False 9. Which one of the following statements about Linux is correct ? Linus Torvalds developed Linux and is still maintaining the current kernel 10. C is the only language available in Linux False QUIZ 2 1. What is the first character in an absolute path name ? / 2. Which part of the commands line command is not optional? command name 3. Which section of the online manual covers which area? 1 User commands 5 File formats 8 Utilities for the administrator 6 Games 4. Which of the following is not a UNIX text editor notepad 5. Which of the following commands take a directory name as parameter? mkdir rmdir cd
CSCI330 Quizzes 3 6. The command to view a file one page at a time is more, less or pg 7. Which parts of the file information are displayed by the “ls -al” command? file name file size owner file type 8. Which UNIX text editor has multiple modes ? vi 9. A relative path name is always shorter than the equivalent absolute path? false 10. A UNIX pathname may contain the following characters any lowercase letter (a-z) any digit (0-9) a period “.” the minus symbol “-” QUIZ 3 1. Which userid is used for anonymous ftp? anonymous 2. A user can belong to only one group False → User can belong to more than group 3. The Linux manager can access file on remote computer in a graphical user interface True 4. Which command does what on typical UXIN system?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 4 scp secure copy to remote host sftp secure file transfer to/from a remote computer ssh secure login to a remote computer ftp file transfer to/from a remote computer 5. Which option for the ssh command enables X11 forwarding? -X 6. The ftp utility does not allow you to use wildcards at all False 7. The symbolic permission setting of "a=rwx" is equivalent to which octal permission: 777 8. The commands "ssh" has been superseded by the "telnet" command to allow secure login to another computer. False 9. what is the command to change permissions on a directory ? chmod 10. Which of the following is NOT and option for the "scp" command ? -O QUIZ 4 1. Shells typically allow you to customize their behavior. Which of the following is NOT a common way of shell
CSCI330 Quizzes 5 customization? a. Startup files found in the /etc directory b. Defaults specified in the /etc/password file c. Startup files found in the user’s home directory. d. command line options 2. A script can only be executed if it has the "execute" set in the file mode. FALSE 3. The "-c" option of the history command shows the number of commands in the history buffer FALSE — [-c] → (empty out history) 4. A regular expression can match a word at the beginning of a line. TRUE 5. Regular expressions and shell wild cards use the same meta characters with the same meaning. FALSE 6. The alias feature is a convenient way to create shorthands for more complicated commands. 7. A Here document uses which symbol on the command line ? << 8. The string "yes yes yes" is matched by which regular expression? .* .* .*
CSCI330 Quizzes 6 9. Environment variables hold their values even after the user has logged out. FALSE 10. Which of the following is not a Unix command interpreter? Rash QUIZ 5 1. The first line of a shell script is called: Shebang 2. The if statement uses parenthesis to enclose the boolean expression it evaluates. FALSE 3.The shell only allows 9 command line parameters: $1, $2, ... $9. FALSE 4.A script can only be run if it has the "x" executable bit set in the file mode. FALSE 5. Which of the following is not a correct matching end for a
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 7 shell keyword that begins the body of a control structure: endif 6. Variables defined within functions are always local, i.e. their values are only known within the function. FALSE 7. Which of the following is not a looping construct in the shell? repeat 8. Which of the following is a data type that the shell does not allow for its variables? boolean 9. A shell function must declare all its parameters before they can be used. FALSE 10. Some normal Unix commands, e.g. echo, are built into the shell and therefore their applicable description is found on
CSCI330 Quizzes 8 the shell man page. TRUE QUIZ 6 1. awk can use which character as field separator? ANY CHARACTER By default what separates words in field is blank spaces with -F we can change that. 2. Variables in awk are initialized how ? to 0 or “ ” depending on content when first used. 3. awk reads input lines automatically TRUE 4. In awk, strings printed with the "%20s" printf directive will always be left justified. FALSE 5. Which command line option allows to specify an awk program in a file?
CSCI330 Quizzes 9 -f 6. Which function in awk is used to divide a string into pieces separated by the field seperator and store the pieces in an array? split 7. What is the meaning of the $0 variable in awk? $0 holds the entire record 8. Every awk program must use the BEGIN and END patterns. FALSE 9. What is the string concatenation operator in awk? space character 10. awk allows strings as array index TRUE QUIZ 7 - sed 1. Which of the following utilities can be used to systematically process files? sed awk tr
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 10 2. the sed editor can be called from a shell script TRUE 3. If the exclamation mark "!" is used after an sed address, then it will only search for obsolete lines. FALSE 4. Which of the following is NOT a valid address type for sed? sublet address 5. If no address is specified for the sed command then the command is applied to every input line. TRUE 6. In sed, the "i" command adds lines before the address TRUE 7. If sed is invoked as "sed -n" then it sorts its input numerically.
CSCI330 Quizzes 11 FALSE 8. Which character is used to delimit the search and replacement components of the sed "s" command ? Any, as long as all 3 are the same 9. In sed, when using a range address, the lines specified need not be consecutive. FALSE 10. In sed, the the dollar sign ($) can be used as single line address. What is its meaning ? The last line of input QUIZ 9 - Systems Programming 1. C library function exit terminates a process and allows to set the return status. A status of 0 indicates failure. False
CSCI330 Quizzes 12 2. In C++ what is the correct include to use the strlen or strcpy library functions ? #include <cstring> 3. Which C library functions enable directory I/O ? opendir, readdir 4. The C library function perror translate an error code into an understandable error message. True 5. The C regular expression library uses 2 functions: regcomp and regexec. Which statement is true about these functions? regexec runs the search that was prepared by regcomp 6. C++ can call functions from the standard C library. True 7. A C++ program cannot access environment variables False
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 13 8. The C structure dirent does not contain the file name. False 9. In C++, C strings are handled the same way as instances of the standard string class. False 10. For the strcpy C library function, the size of the destination array must be long enough to contain the source string including the terminating null character. True Quiz 10 - IO Management 1. Which of to following is a system call that can be used to create a file ? open 2. The read and write system calls use C++ strings to handle its data. False
CSCI330 Quizzes 14 3. Which of the following is not a valid flag to for the open system call ? O_READ Valid flags: O_WRONLY, O_RDWR, O_RDONLY 4. Which system call is used to remove a file ? unlink 5. A system call uses a special C++ syntax for invocation. False 6. The dup system call is used to claim standard I/O from inside a program. True 7. open, close, create, read and write are system calls to achieve low-level I/O. False
CSCI330 Quizzes 15 8. System calls typically set the errno variable and return -1 if they encounter and error. True 9. C++ uses which of the following to identify a file in low- level IO using system calls ? file descriptor number 10. A system call is linked to an executable and becomes logically part of the executable. False Quiz 11 - Process Pipe 1. A process is a program in execution True 2. Which of the following is not a potential return value from the fork system call ? 1, to indicate that 1 child process was created
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 16 3. A Unix pipe is represented in C++ as an array of _____ file descriptors two 4. The pipe system call creates a bidirectional data channel. False 5. System calls pipe, dup and fork are used together to implement the "I" pipe character used by the command interpreter on the command line. True 6. The fork system call duplicates the current process. The 2 processes (old and newly created) are exactly the same. False 7. Which system call creates a new process? fork 8. How long does the wait system call wait?
CSCI330 Quizzes 17 Until a child process terminates 9. Unix process can communicate via Unix pipes. True 10. Match execl, execlp specify arguments as list execv, execvp specify arguments as array of strings execlp, execvp look for new executable via PATH Quiz 12 - Networking 1. Which service resolves FQDN into IP address? DNS 2. getaddrinfo is a Unix system call ?
CSCI330 Quizzes 18 False 3. Match Transport Layer Network Layer Data link Layer Physical Layer provides functions to guarantee reliable network link establishes, maintains and terminates network connections ensures the reliability of the link controls transmission of the raw bit stream over the medium 4. Which of the following is not a technology used in the physical layer of the OSI model? TCP 5. Match Port 22 Secure Shell (SSH)
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 19 Port 25 Port 80 Port 53 Simple Mail Transfer Protocol (SMTP) Hypertext Transfer Protocol (HTTP) Domain Name System (DNS) 6. A _______ describes the syntax, semantics and synchronization of communication protocol 7. OSI in the OSI reference model stands for? Open Systems Interconnection 8. Which later in the oSI model provides addressing via an IP address? Network Layer 9. A protocol describes the syntax, semantics, and synchronization of communication True
CSCI330 Quizzes 20 10. Both IPv4 and IPv6 addresses are 32 bit long False Quiz 13 1. The listen system call allows to specify the length of the incoming queue. True 2. The accept system call is used in UDP server programming. False 3. The TCP 3-way handshake consist of which sequence of messages ? SYN SYN, ACK ACK 4. Which of the following protocols is not part of the OSI model transport layer ?
CSCI330 Quizzes 21 HTTP 5. A socket is end-point of a communication link, it is identified by: IP address, Port Number 6. The socket programming concept was first introduced as part of Windows 2000. False 7. TCP is the transmission control protocol that is connection oriented and guarantees delivery. True 8. Match the system calls to their functionality. socket bind sendto create a new communication endpoint attach a local address to a socket send some data over the connection
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 22 recvfrom receive some data over the connection 9. What is the purpose of the htons library function ? convert a host integer into a network 2 byte integer 10. The TCP protocol uses a datagram as message. False Quiz 14 - TCP Server & Shell Job Control 1. Which number represents the strongest signal that can be sent to a process ? 9 2. The dup system call can be used in a forking TCP server to simplify sending responses to the client. True
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 23 3. A program can be running in the foreground and background at the same time. False 4. Which command shows the jobs for a user: jobs 5. For the read system call, what can we program to allow an unlimited amount of data being read ? use a loop to read fixed chunks of data 6. Upon success, the opendir function returns a file descriptor for the directory. False 7. What is the command to send a signal to a process ? kill 8. The readdir function returns a structure which contains the name of the directory entry.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 24 True 9. A typical TCP server uses what to reduce client waiting time fork to create a child process for the client request 10. Only the superuser can create periodically running jobs via crontab. False Quiz 15 - System Administration 1. a user can belong to only one group. False 2. Which of the following files is not involved in storing user information ? /etc/root 3. Which of the following is not a file format used to package Linux software ?
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 25 mp4 4. What does this command do: mount /dev/sdb1 /mnt/extra makes the first partition on disk sdb available as logical directory /mnt/extra 5. Only users or groups that are listed in /etc/sudoers can execute commands as super user. True 6. In Unix there is one logical file system that is constructed from one or more physical file systems. True 7. What is the command to create a file system on a physical device ? mkfs 8. The only way to create a new user on Linux Mint is to use the GUI dialog "Users and Groups".
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
CSCI330 Quizzes 26 False 9. Which of the following is not a usual way to install new software on Linux ? Update Manager 10. Which UNIX command is used to change the login password ? passwd
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help