What is the output of this program?
#! /usr/bin/awk -f
BEGIN {
for(i=0;i<=5;i++) {
print i
i++
}
}
a) 0,2,4 will print
b) 1,3,5 will print
c) 1,2,3,4,5 will print
d) syntax error because i is not initialised
Submitted by: Murtazaa) 0,2,4 will print
Output:
root@ubuntu:/home/google# ./test.awk
0
2
4
root@ubuntu:/home/google#
Submitted by: Murtaza
Output:
root@ubuntu:/home/google# ./test.awk
0
2
4
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. |