Answers

Question and Answer:

  Home  Awk Programming

⟩ What is the output of this program? #! /usr/bin/awk -f BEGIN { a=5 while (a<5) { print "google" a++; } } a) nothing will print b) "google" will print 5 times c) program will generate syntax error d) none of the mentioned

a) nothing will print

Explanation:

The condition of while statement is false so commands inside the loop will not execute.

Output:

root@ubuntu:/home/google# ./test.awk

root@ubuntu:/home/google#

 148 views

More Questions for you: