140
80.9k
Chapter:

60+ Unit 2 Solved MCQs

in Linux Programming

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Master of Computer Applications (MCA) , Programming Languages .

Chapters

Chapter: Unit 2
51.

Which command will you use to see the available routes?

A. show route
B. route status
C. netstat -r
D. none of the mentioned
Answer» C. netstat -r
52.

The permission -rwxr-xr-t represented in octal expression will be

A. 0777
B. 1755
C. 1754
D. 2754
Answer» B. 1755
53.

With a umask value of 112, what is the default permission assigned to newly created regular file?

A. —x–x-wx
B. -rw-rw-r–
C. -r-xr-x-r–
D. -rw-rw-r–
Answer» D. -rw-rw-r–
54.

Which command is used to assign read-write permission to the owner?

A. chmod a+r file
B. chmod o+r file
C. chmod u=rw file
D. chmod og-r file
Answer» C. chmod u=rw file
55.

Given the command $ chmod o-w datafile

A. sets write permission to everyone for datafile
B. sets write permission to others for datafile
C. clears write permission to everyone for datafile
D. clears write permission to others for datafile
Answer» D. clears write permission to others for datafile
56.

Which of these commands will set the permissions on file textfile to read and write for the owner, read for the group, and nothing for everyone else?

A. chmod 046 textfile
B. chmod 640 textfile
C. chmod 310 textfile
D. chmod rw r nil textfile
Answer» B. chmod 640 textfile
57.

If you are a root user, how can you grand execute permission only for the owner of the file project1?

A. chmod +x project1
B. chmod u+x project1
C. chmod a+x project1
D. chmod U+X project1
Answer» B. chmod u+x project1
58.

A user executes the following command successfully: $ chmod +x file1.txt Which of the following is true of the output of this command?

A. The command results in adding execute permission to the user who ran this command
B. The command results in adding execute permission for the owner of the file
C. The command results in an error since the file is not an executable file
D. The command results in adding execute permission for all users (i.e., user,group & others)
Answer» D. The command results in adding execute permission for all users (i.e., user,group & others)
59.

What does chmod +t do?

A. wrong syntax
B. set effective userid for filename
C. set effective groupid for filename
D. set the sticky bit
Answer» D. set the sticky bit
60.

Which of the following umask settings doesn’t allow execute permission to be set by default on directory files

A. 222
B. 111
C. 000
D. 444
Answer» D. 444
61.

Which of the following umask settings allow execute permission to be set by default on regular files

A. 222
B. 111
C. 000
D. None of the given choices
Answer» D. None of the given choices
62.

The command chmod 4777 a.out

A. will set the suid bit of a.out
B. will set the suid bit of a.out only if the command is issued by root
C. is not a valid command
D. will set the sticky bit of a.out
Answer» A. will set the suid bit of a.out

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.