Answers

Question and Answer:

  Home  Awk Programming

⟩ 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

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#

 200 views

More Questions for you: