Awk Programming frequently Asked Questions in various Awk Programming job Interviews by interviewer. The set of questions here ensures that you offer a perfect answer posed to you. So get preparation for your new job hunting

## 40 Awk Programming Questions and Answers:

### 1 :: What is expression in awk programming? a) expression evaluates a value to print, test or pass to a function b) expression assigns a new value to a variable or field c) both (a) and (b) d) none of the mentioned

c) both (a) and (b)

d) 3
Output:
3

Output:

### 4 :: What is the output of this program? #! /usr/bin/awk -f BEGIN { one=10; two=3; print (one%two)+10 } a) (one%two)+10 b) 13 c) 11 d) syntax error

c) 11
Explanation:
The remainder of 10/3 is 1. remainder is added to 10.
Output:
11

a) true
Output:
true

### 6 :: The comparison expression "x ~ y" will true if: a) x is not equal to y b) the string x does not match the regular expression denoted by y c) the string x matches the regular expression denoted by y d) none of the mentioned

c) the string x matches the regular expression denoted by y

### 7 :: What is the output of this program? #! /usr/bin/awk -f BEGIN { print "20"<"9" ? "true":"false" } a) true b) false c) syntax error d) none of the mentioned

a) true
Explanation:
The operands of relational operators are converted to, and compared as string if both are not numbers. Strings are compared by comparing the characters of each. Hence 20 is less then 9.
Output:
true

### 8 :: All numeric values are represented within awk in: a) double precision floating point b) integer c) exponential notation d) fixed point

a) double precision floating point