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

Submitted by: Murtaza
a) true
Explanation:
The operands of relational operators are converted to, and compared as string if both are not numbers. Strings are compared by comparing the characters of each. Hence 20 is less then 9.
Output:
root@ubuntu:/home/google# chmod +x test.awk
root@ubuntu:/home/google# ./test.awk
true
root@ubuntu:/home/google#
Submitted by: Murtaza

Read Online Awk Programming Job Interview Questions And Answers