⟩ Code snippet (file1 size is 2024) f1 = fopen (file1, RDWR, RWX) lseek(f1,1024,SEEK_SET) write(f1,buf,10) What is offset now. a) 1024 b) 1034 c) 2034 d) 2054
b) 1034
b) 1034
Parameters can be passed to a function a) by using the parameter variables $1, $2, $3……. b) by using the environment variables c) both (a) and (b) d) none of the mentioned
What is the output of this program? #!/bin/sh san_function() { echo "Welcome to the google" printf "World of Linuxn" } unset -f san_function san_function exit 0 a) Welcome to the google b) World of Linux c) both (a) and (b) d) nothing will print
What is the output of this program? #!/bin/sh echo "Just call the function" san_function san_function() { echo "This is a function" } exit 0 a) only first string will print without any error b) only second string will print without any error c) both strings will print d) none of the mentioned
Which command reads user input from the terminal and assign this value to a variable name? a) read b) get c) declare d) set
Which one of the following is not a valid shell variable? a) _san b) san_2 c) _san_2 d) 2_san
In the shell, by default, all variables are considered and stored as a) string b) integer c) character f) float
What is the output of this program? #!/bin/bash san_var=hello readonly san_var san_var=hi echo $san_var exit 0 a) hello b) hi c) nothing will print d) none of the mentioned
What is the output of this program? #!/bin/bash san_var=10 echo "the value of "san_var" is $san_var" exit 0 a) the value of "san_var" is 10 b) the value of is 10 c) the value of san_var is $san_var d) the value of "san_var" is $san_var
Single user mode shell runs as a) Admin user b) Root user c) normal user d) Log user
Which is the only partition mounted in Single user mode? a) boot b) usr c) root d) tmp