Awk Programming Question: Download Questions PDF
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
Answer:
d) 3
Output:
root@ubuntu:/home/google# chmod +x test.awk
root@ubuntu:/home/google# ./test.awk
3
root@ubuntu:/home/google#
Output:
root@ubuntu:/home/google# chmod +x test.awk
root@ubuntu:/home/google# ./test.awk
3
root@ubuntu:/home/google#
Download Awk Programming Interview Questions And Answers
PDF