⟩ Differentiate between Compiler and Interpreter?
An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions.
An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions.
What is expression in awk programming? a) expression evaluates a value to print, test or pass to a function b) expression assigns a new value to a variable or field c) both (a) and (b) d) none of the mentioned
What is the output of this program? #! /usr/bin/awk -f BEGIN { two=2; two++; print two } a) two b) three c) 2 d) 3
What is the output of this program? #! /usr/bin/awk -f BEGIN { var1="google" var2="linux" print var1" provides "var2" MCQs " } a) google provides linux MCQs b) var1 provides var2 MCQs c) provides MCQs d) syntax error
What is the output of this program? #! /usr/bin/awk -f BEGIN { one=10; two=3; print (one%two)+10 } a) (one%two)+10 b) 13 c) 11 d) syntax error
What is the output of this program? #! /usr/bin/awk -f BEGIN { a=10; b=10; print a==b ? "true""false" } a) true b) false c) syntax error d) none of the mentioned
The comparison expression "x ~ y" will true if a) x is not equal to y b) the string x does not match the regular expression denoted by y c) the string x matches the regular expression denoted by y d) none of the mentioned
What is the output of this program? #! /usr/bin/awk -f BEGIN { print "20"<"9" ? "true""false" } a) true b) false c) syntax error d) none of the mentioned
All numeric values are represented within awk in a) double precision floating point b) integer c) exponential notation d) fixed point
Concatenation is performed by a) writing expressions next to one another, with no operator b) conditional operator c) relational operator d) matching operator
Which command on the command line provides the same output as this executable awk script? #! /usr/bin/awk -f BEGIN { print "google" } a) awk 'BEGIN {print "google"}' b) awk 'print "google"' c) awk 'print {google}' d) none of the mentioned