MCQ’s1. Which commands are used to list all the files in the current directory (including the hidden commands)? a. ls-l b. ls-a c. ls-t d. ls-I 2. __________ is the shell that is used for a single user mode. a. Bash b. Csh c. Ksh d. Sh 3. Single user mode shell runs as a(n) __________. a. Admin user b. Root user c. Normal user d. Log user 4. Which of the following are the true functionalities of a kernel? a. Allocates time and memory to programs b. Authenticates users c. Interprets commands d. All of the above 5. A shell is ___________________ a. An interface between the kernel and the hardware b. An interface between the user and the applications c. Acommand interpreter d. A command compiler 6. The command “cat –n file” will ________________________ a. Add a new line after every thingof the output b. Add line numbers to every line of output c. Will show only number of lines d. None of the above. Comment [H1]: Please note the footer in the document. Not clear as to delete it or not. Please check. 7. Which of the following will show the first 5 lines of the input file? a. Less -5 filename b. Head -5 filename c. More -5 filename d. None of the above 8. cat file.txt | less The above command __________ a. Shows error b. Displays one page c. If a file has a large number of containers that won‟t fit in the output terminal, thescreen scrolls up very fast d. None of the above 9. Which command is used to read file and display the file at a time? a. Head b. More c. Tail d. Less 10. $ mkdir dir5 $ cd !$ What is the output of the above piece of code? a. Points to dir5 b. Points to home directory c. Shows the path d. None of the above 11. Which of the following commands gives the available space mounted on the file system? a. Du b. Df-h c. Du-sh d. Free 12. Which command is used to assign read-write permission to the owner? a. Chmoda+r file b. Chmodo+r file c. Chmod u=rw file d. Chmodog-r file The command 'fgrepstrcpy *. The '-regex' option in 'locate' command is used to _________. copy the string in to all files in all the directories d. fgrep -c “{” pgm. 711 14. fgrep -i “{” pgm. search for a basic regular expression c. a. Which is the correct order of OSI PDUs? . specified N lines around the match b. 744 b. 'grep -A <N> "string" FILENAME' displays a. Command used to display the number of the line containing "{" in a program is _____. copy the string in to all files in the current directory b. a. search for N in the file d. search for a word regex d. 777 d. touch -r file1 file2 b. touch -r file2 -B 30 file1 d. The permission -rwxr–r– represented in an octal expression will be ______. fgrep -f “{” pgm.c c.c d. a.c b. fgrep -h “{” pgm. specified N lines before the match. One of the following commands tells touch to use that file1 time stamps instead of current time.13. search the string in all files in all the directories 15. touch -r file2 file1 c. a. touch -r file1 -B 30 file2 18. search the string in all files in the current directory c. 666 c. a. specified N lines after the match c. search for a basic regular expression and no patterns are allowed 17. 19.c ' is used to _______________.c 16. interpret all the patterns as extended regular expressions b. 1.a.1.33 c. b. If the sender is a host and wants to send a packet to another host on another network. What is the command used to copy multiple files (with an extension . Segment. a. The IP address of the router found in the routing table c. 48 c. Segment. 10.32 to 10.47 d.255. for example 10. Segment. Both aand b d. Packet.1. Bit Bit. Network switched d. Packet. Transport layer 22.1. then the broadcast address is _____.v) from the local machine to the remote server? . a.47. Frame. Data.1. 10.1.46 25. which of the following should be the logical address that must be mapped to a physical address? a. Circuit switched b.32/47(subnet mask: 255. In classless addressing.240) defines the range 10.1. Frame. Data 20. 10. the destination and source are MAC addresses of size____. Presentation layer d. 16 21. d. The destination IP address in the datagram header b.1. Packet. Application layer b.1. 32 b. None of the above 23. 64 d.1. Bit Bit. Packet switched c. Session layer c. Both a and b 24.32 b. Packet.1. c.25 is an example of which of the following network(s) a. One of the following layers organizes and synchronizes the exchange of data between the application processes. In Ethernet frame. X.1. Segment.1. 10. Frame. Frame Data.1. a.255. Data. v mput *. d.v 26. xferlog 27. /etc/group file b. put *. a. Utility Resource Limited d. It is not possible d. LDAP c. ftp conversions c. The server handle requests for other domains are done ________. a. Email is transmitted on internet via ______. ftp access b. URL means a.a. PPP 30.v get *. HTTP b. PPP b. The control access file which specifies the ftp host access and deny parameters is ____. a. directly b. /var/log/security/group file 28. Universal Resolver Link b. c. a. DNS d. Universal Resource Located c. ftp hosts d. b. FTP c. by contacting remote DNS server c. a. indirectly 31. /etc/security/group file c. _____ protocol provides a directory service that lets users query a database of network resource information. /var/log/groups d. ____ is the location of the file which contains the extended group attributes. AMBA 29. SMTP d. Universal Random Link 32. Which of the following is/are the property(s) of DFS? .v mget *. a. Location transparency c. a. Web server c. AFS d. buffer. Access control module b. RAM b. count=read(filedes. None of the above 34. Scalability transparency d. c. the naming of file system is controlled by client mount operations. Mobility transparency b. b. None of the above 37. Block module b. One of the following file system operationsis used to move read-write pointer to the offset. status =link(name1.name2) 35. One of the following modules contains disk I/O and buffering. buffer. One of the following modules accesses and allocates disk blocks. d. lseek() b. Device module d.n) b. count=write(filedes.a. status=stat(name. a. Which of the following is an example of DFS? a. Access control module c. One of the following gets the file attributes for file name into buffer. Block module c.n) c. link() . Access transparency 38. a. Sharing Persistence Distributed cache All of the above 33. In one of the following transparencies. Sun NFS 36. File access module d. buffer) d. a. d. Security ii. read() d. Transparency a. ii & iii 44. based on application 42. a. c. open() c. NFS is a a. Versions 2 & 3 c. One of the following file system operations delivers a UFID for the file. Version 4 d. close() 39. write() 40. None of the above 43. i & iii b. Kerberos b. . a. Which version of Kerberos uses Data Encryption Standard? a. i & ii c. AFS uses one of the following security mechanisms. Inbuilt security mechanism d. NFS client 41. Virtual file system b. i. AFS is a worldwide file system. unlink() d. Finite state file server Stateless file server Stateful file server Can be configured as any. b.c. Root squashing c. Versions 1 & 2 b. Version 5 45. ii & iii d. UNIX file system d. NFS server c. AFS advantages over NFS i. create() b. Scalability iii. Which block in NFS architecture is used to identify local and remote files? a. Choose the correct statement i). Single quotes doesn‟t allow variable expansion whereas double quotes does allow c. i)&iv) i). 2). my $b = @a. a. Larry Page & Sergey Brin d. 4 bytes d. // b. Any of these 50. Commenting in PERL is done using the key word _______ a. d. 1. No limit 47. iii). iii)&iv) ii)&iv) i) only 46. print $b. c. Vice is apart of workstation and venus is a part of server in AFS. Both allow variable expansion d. iv). 0 . What could be the output of the code my @a = (0. Neither of them allow 48. Single quotes allow variable expansion whereas double quotes doesn‟t allow b. Vice is apart of workstation and venus is a part of server in NFS. What is the difference between single quotes and double quotes in PERL? a.ii). What is the Size limitation of a string in PERL? a. Guido Van Rossum 49. # c. NFS is a workgroup network file service. Dennis Ritchie b. 1 bit c. b. /* */ d. PERL is created by _______ a. Larry Wall c. 1 byte b. a. b. /string/ c. 10 % 3 c. None of the above 57. use „fname. () d. What is the output of @food.8 % 3. 3 d.0 b. 2 d. &print_header()."venki"). =~ b. {} c. Rajramvenki b. One of the following string matching operatorsis used in PERL scripting? a. ( Procedural) a. @print_header(). 3 51. Raj ram venki c. =~s b. 10. require „fname.pl‟ c. @food 53. ______ is the keyword used to load standard functions in PERL. What is the operator used for a function call? a."ram". b. a. &print_header c. get „fname. Assignment Operators . Both a&b 54. Which Operators has more priority in PERL Scripting? a.pl‟ d. Which Symbol is used for Interpolation in PERL? a. (10.pl‟ b.pl‟ 55. d. Given@food=("raj". put „fname. 3 d.0 % 3. 1 c. In PERL."". “” 52. Unary Operators b. \string\ d.2) is equivalent to ______________. a. “string” 56. ->. a. Condition true a=3 else a=2 d. What would be the output of the following program? use strict. my $x = “6P”.c. What is the output of the following @array = (1. Condition true a=2 else a=3 b. my $y = 3.2). d. chomp(@array). $y. 6P. Bob jillfred d.++. fred c. a. print "@array\n".--.10 a. 1234 c. usewarnings. c. Logical Operators d. 1342 b. b. a. None of the above . Error 59. Print @array. Bob Jill Fred b. $y 6P3 Warning/Error 60. "jill\n". Error 61. Always a=3 c. jill .** 58. print $x . What would be the output of the following operation? (Procedural) ($condition ? $a = 2 : $a) = 3. Bob .sort 4. 1324 d.3. my @array = ("bob\n".3 $x . "fred\n"). a. print “The value \” of \$result is $result \\n”. print $a--. $result=14. $a = 4. 2. The value “ of $result is $result c. 2. print “@array”.4 b. $array[1]=5. “perl” b. Chomp($string) in PERL a. Removes the end-of-line character of the operand and returns the numberof characters removed (0 or 1) b. “Perl” c. If $z=”perl” then What is the output of $c=”\l\U$z” a. Removes the last word of the operand and returns the removed word. print --$a. 1 5 3 4 undefundef 17 22 . The value “ of $result is 14 67. 1 5 3 4 17 22 b. 4. None of the above 63. Removes the last character of the operand and returns the removed character c. Removes the last character of the operand and returns the removed character c.3. The value of 14 is 14 b. @array=(1.4 66. Removes the end-of-line character of the operand and returns the numberof characters removed (0 or 1) b.62. “PERL” 65. “pERL” d.2 c. Removes the last word of the operand and returns the removed word d. The value “ of $result is 14 \n d. a.4). d. $array[7]=22.2.2 d. None of the above 64. $array[6]=17. 4. Chop($string) in PERL___________ a. will print a. [OneTwoThree] and size = 3 b. "Two". None of the above 73. push. Braces 71."\n".unshift&pop. print "size = ". "Three"). @c=(0. What is the output of the following code snippet when arrays @c and @d are printed? @a = (1. c. push .c. b. print "[".shift c. Double quote strings c. None of the above 70. the methods followed are _______.5."]\n". d. Variable interpolation occurs in ________________. None of the above 68. a. @list () .pop &shift. What are the conditions used to clear an array? a. One Two Three and size = 3 c. @color=(“violet”. which of the operators work on top of stack & which work on bottom of the stack? a. OneTwoThree and size = 2 d. a.”blue”). unshift. [email protected]).@a. 0 1 5 7 9 and violet green blue 1 5 7 and violet green blue 0 1 5 7 9 and violet green blue None of the above 69. use {} b. @d=@e=@color.”green”. Single quote strings b. a. 1 2 3 4 undefundef 17 22 d. use backslash d.unshift b.9). Back slash d. all of the above 72. To avoid the array reference.pop d.@a. Among the following. use concatenation c.shift &push. What is the output of the following code snippet? @a= ("One". ” .5]]\n”.”1”.”2”. .xyz 77. In Hashes. . a hash table is often used to implement ______. {…} . % c. value d.b. keys c. If @a=(“x”. abc c. . 3 d. Value.@a” elements \n” a.”z”) then what will be the value of print “there are “. Associative array c. c12 76. ( Procedural) a. key b. @ 80. Unpacked array d. {…} . a. Key. […] b. One of the following operators will delete all the contents in the hash. a. # b.”3”) then print “slice=@a[@a[3. A reference to a list and a hash is created by enclosing a list in _____ and ______ respectively.”y”.xyz c. $ d. 123 d. Keys. Packed array b. Remove . […] . {…} 75. undef @list c. xyz b. Value. bc1 b. the even index elementsand the odd index elements correspond to __________. value 79. Hash variables are named beginning with the character..4. If an array is assigned to a hash. […] . a. both 1&2 74. If @a=(“a”. […] c. a.”c”. @list=undef d. Fixed array 78. a. {…} d.”b”. Which operator indicates a pattern matching? a. $r[3] is the element at index 3 of @r. a. Opening a file c. Appending to a file b. actual parameters c. Which character stores the value which is matched with pattern? a. Which of the following is true statement? a. One of the following functions is used to position the file handle cursor at different positions. 82. Head d. Appending to a file that already exists b. p 83. Read b. All the above. Delete c. Undef d. Opening a file c. If $r = \@list then $$r[3] is the element at index 3 of @list b. None of the above 84. Seek c. formal parameters b. What does the >> operator indicate in a file? a. mp d. Any of the above 81. Deleting the context d. Both b and c 85. regional parameters 86. More 87. $` b. completely unrelated d. a. What does the > operator indicate? a. $‟ . m b. Parameters in the „fun call‟ are called _______. $r->[3] is also the element at index 3 of @list c. pm c. functional parameters d.b. d. Deleting context of an existing file. Which of the following separates the back-end work of downloading. return b. d. Which of the following is used to check whether the pattern is not matched a. !~/ / d. @ INC d. None of the above 94. The package should be saved with the extension ______________.(coma) d. “ ” 89. Single space b. How do you perform a forward declaration of a subroutine performed? a.pk d. sub name {}. a. b. $& d. 1 c. 91. The last line of the package should be ________ a. None of the above 93. forward sub name. None of the above 90.pm c. . 0 . =~/ / c. Tab space c. @NIC b. CPANPLUS c. None of the above 88. None of the above 92. a.c. . . @CIN c. sub name. CPAN b. compiling. Default delimiter in split command is ____________. c. and installing modules from the interactive shell used to issue commands? a. =!/ / b. ACPAN d. . sub {}.pc b. The locations where PERL looks for the module are listed in? a. Entries with identical names can co-exist because they live in __________ a. Tool For Compiler Language 97. Strings d. In TCL scripting. Dennis Ritche b. None of the above 96. Tester Kit b. $ . None of the above 98. Cross platform d. John Ousterhout d. same namespaces c. a. Mac platform b. Procedures c. \ c. Floating point numbers Variable interpolation is caused by one of the following. TCL stands for ___________________. white space b. TCL is created by a. James Gosling c.TK stands for a. package d. a. Windows platform c. Tool Communication Language c. Linux/unix platform 99. TCL uses the following scripting language ______________ a. a. Tool Kit c. Variables b. TCL extension . None of the above 95. # d. 101. different namespaces b. Tool Command Language b.d. Tool Kernel d. everything is treated as _________. Tool for C Language d. Larry Wall 100. $ c. Gate Arrays 104. 4 6 8 10 The output of TCL program set x 4 . c. Command interpolation caused by one of the following a. 106. b. \ b. c. c. Set b\%a set a 4 expr $b*2 a. sety x+10. [] 103. $ a. 107. % d. b. white space \ # $ Command interpolation is caused by one of the following. \ b. . TCL arrays are __________ a. a. Random arrays c. Strings b. d. 4 5 x+10 None of the above Variable interpolation is caused by one of the following.102. d. a. d. b. 105. Associative arrays d. Comment [H3]: This is a repeat question. Upvar c. none 111. b. The same question is given in question 104. Global variable errorInfo provides ______ a. 5 c. Please check. d. 110. The same question is given in question 103.c. Please check. Stack trace Error information Control over files Global info a. 109. d. sety x+10. 4 b. 113. 8 d. d. Global b. c. x+10 d. c. The same question is given in question 105. [] 108. 4 b. Uplevel Comment [H2]: This is a repeat question. Which of the following Binds a local variable in the selected context? Upvar Uplevel Global Local 112. a. b. % d. set b\%a set a 4 expr $b*2 a. . Please check. c. a. 6 c. tcl arrays are? strings random arrays Associative arrays gate Arrays Which of the following evaluates a script in the selected context? a. 10 Output of tcl program set x 4 . b. Comment [H4]: This is a repeat question. b. What does Command “. Which of the following are line oriented commands? Set and reset Gets and puts Printf and scanf Seek and read 116. Which of the following are used to draw primitives? Canvas widget Hierarchal widget Temporary widget None of the above a. set month [lindex @d 2]. d. You can create a main window by _____ a. set month [lindex @d 1]. Stacktrace 114. set year [lindex @d 6] d. Return d. TCL c. Figure out the current month and year. c. Set 115. 118. set year [lindex @d 5] a. 119. set month [lindex $d 1]. d. User defined function starts with one of the following keywords. set year [lindex $d 6] b. a. Which of the following is the widget command to query configuration env cget fget goto 117. d.x config –background red” do? Configure .d. d. c. b. wm command c. set month [lindex $d 2]. Proc b. 120. date(d) returns a string like: Sun Sep 22 22:26:10 PDT 1996 a. cget command . c. c. set year [lindex $d 5] c. b. using config command b. b.x background as red Configure window to red Configure background as red None of the above a. a. Traces are invoked only when ________ Variable is accessed or modified via the array command Variable is read or written Variable is unset All of the above a. TCL_ERROR 125. set y 3. a. d. b.tree move . b. What type of the command is involved in the following code? set x 2. Rearranging items in a Tree cannot be done using _________. Pre-allocated space Static result FreeProc Library procedures 122. d. c.tree detach . expr $x-1.tree insert . c. a. b. b."eq") is useful for _________ Object commands Weather reports Packages Parsing a. d. 123.d. string compare $x $y. TCL . TCLERROR TCL_OK. expr $y-1.tree delete a. TCL_DeleteCommand (interp. . ERROR TCLOK. TCL commands for normal completion and error are ______ respectively OK. 124. ERROR TCL . d. OK. b. b. fget command 121. c. c. 126. Object-oriented commands Action-oriented commands Formatting commands None of the above a. . d. c. d. We use one of the following to dispose the result in TCL. c. float b. short int.127. int. What would be the output for the following Python Script? >>>”!!!Python!!!”*3 a. 3 b. int. int. “!!!Python!!!”*3 c. x c. c. a 129. Python Script: a is 6 a ++ b is 3 a += b Value of a. complex c. float 130. What is the value of „b‟ in the following code? Set a 1 Set b $a $a a 1 Random value What is the value of x below? Set Set Set Set a 1 b 3 c 5 xa?b:c a. Error 131.3 d. long int. b at the end of the script a. a. 9. !!!Python!!! b. double.3 c. long. b d. short int d. complex. float. long int. set. int. Python supports the following set of Data types? a. „!!!Python!!!‟ d. 128. Error . 6.3 b. d. b. 10. None of the above . 1. 1 0. What would be the output of the following program? #!usr/bin/python Print 3. 9. Pass by reference. 0. 1 1. Pass by value. how does the python script act? a.9 b.5+4 c. 0. Local to that b. 5+4. For immutable and mutable objects. pass by reference d. Variables assigned at the top of the module implies to be ______ a.5.023456) Print bool(0000) Print bool(1111) a.5+4 d.132. 0. 9. Noth a and b d. None of the above 135. Global variables c. 0. 9.9 133. 9.0 Print 3/2 Print float(1)/float(2) Print str(9.023456. 0. b. Write the Output for the following program? input = raw_input (“ Enter an Expression “) # 5+4 print input k = input(“ Enter an Expression ” ) # 5+4 print k What are the values of input &k ? a.pass by value b.023. 1111 None of the above 134. 0.0/2.5. 0000. 9. d. 0. Call by value. call by reference c.5. c. 5+4. 0. c 139.center (width. Strings b. Regular expressions d. Which of the following are immutable? a. Given a string abc = “ moon ”.join(sequence) c) S. True b. What is the output for >>>”education”[-1] ? a. None of the above 137. fill char) b) S. end]]) . Variables c. what is the output of abc. start [ . False c. e b. i d.136. Output for the following operation >>> 5+5=10 or 1+1=1 a. All of the above 138. then. Error d.count(o)? a) 2 b) 1 c) None of the above d) 0 141. n c. What is the output for the following code? >>>example = “ hello world ” >>>print “%s“ % example [4:7] a) hello b) ew c) ol d) lo 140.find(substring [ .isspace() d) S. Which of the following returns space padded string? a) S. 4 ] for (a. 3 4 d. b)^ c)* d)$ 144. What would be the output of the following: >>>len((“rose”.find(“boring”) a=a[:loc] + ” fun ” print a a) He found it fun b) He found it fun and he left c) He found it boring d) None of the above 143.b) in zip (A.142.MULTILINE d) None of the above 145. 4 6 147.)) >>>len(“rose”) .end) positions of the match? a) group() b) start() c) end() d) span() 146. Which of the following contains a tuple containing the (start. What is the output of the following code? a=”He found it boring and he left” loc=a. Which of the following makes ^ and $ before and after each line break in a string? a) re. 3 8 b. 2 ] B=[ 3 .B): print a*b a. Which of the following symbol matches the start of a string? a).DOTALL c) re. IGNORECASE b) re. 1 2 c. What is the output for the given code? A=[ 1 . 4] >>>print b[1][0] a.2.2. [1. 4.>>>len([0. 150.2] >>>x.2] >>>b=[a. („Tony‟.‟rose‟] [„rose‟. 1 b.4.) c. (“Tony”. 1. What would be the output of following: >>>x=[1.3.3 c.2] [1. 1.append(“rose”) >>>print x a. c.1 148.3.1. None of the above . 5 d.3 d. (“Tony”) b. d. Not possible 149.‟rose‟]) a. b.) d. 4.1.2. What would be the output of the following: >>>a=[0. 3 c.1.3 b.rose] None of the above One of the following is a tuple: a.1.