Question
What is the output of the program? #! /usr/bin/awk -f BEGIN { a[1]=IFT383 a[2]=IFT383 for(i=1;i
What is the output of the program?
#! /usr/bin/awk -f BEGIN { a[1]="IFT383" a[2]="IFT383" for(i=1;i<3;i++) { print a[i] } }
a.
IFT383 will print two times
b.
IFT383 will print three times
c.
the program will generate an error because two array elements have the same value
d.
the program will generate a syntax error
Which of the following statements is an example of string concatenation in awk?
a.
print "Hello" " world"
b.
print "Hello" + " world"
c.
print "Hello"." world"
d.
print "Hello world"
What does the following nawk script print?
'BEGIN {
for (key in ENVIRON)
print key "=" ENVIRON[key]
}'
a.
All the environment variables with their values
b.
All subscripts of the ENVIRON array
c.
Just the names of the environment variables
d.
Nothing
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started