Examveda

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

Answer: Option B


This Question Belongs to Computer Science >> Linux

Join The Discussion

Related Questions on Linux