What is the output of the program?
#! /usr/bin/awk -f
BEGIN {
a[1,1]=0
a[1,2]=1
a[2,1]=2
a[2,2]=3
for(i=1;i<3;i++) {
for(j=1;j<3;j++) {
print a[i,j]
}
}
}
a) 0 1 2 3
b) 0 2
c) 1 3
d) syntax error
Submitted by: Murtazab) 0 2
Output:
root@ubuntu:/home/google# ./test.awk
0
2
root@ubuntu:/home/google#
Submitted by: Murtaza
Output:
root@ubuntu:/home/google# ./test.awk
0
2
root@ubuntu:/home/google#
Submitted by: Murtaza
Read Online Awk Programming Job Interview Questions And Answers
Top Awk Programming Questions
☺ | The next statement: |
☺ | The command \"awk {print $1} san.txt\" will: |
☺ | The break statement: |
☺ | Which statement instructs gawk to stop processing the current data file? |
Top Linux OS Categories
☺ | Device Drivers Interview Questions. |
☺ | Linux OS Management Interview Questions. |
☺ | Linux Makefile Interview Questions. |
☺ | Linux Environment Interview Questions. |
☺ | Linux OS Shell Interview Questions. |