Q1. Consider the following expression $modresult - 33 % 11; What is the value of $modresult in the expression?
A.1
B. 3
C. 0
D. -3
Correct Answer: C
Q2. Which statement will open the /etc/passwd file for reading only?
A.open(PASSFILE '+>/etc/passwd');
B. open(PASSFILE, '/etc/passwd');
C. open(PASSFILE '+</etc/passwd');
D. open(PASSFILE, '>/etc/passwd');
Correct Answer: B
Q3. Which statement will print the capital attribute of the $kansas object?
A.print ('capital'=>$kansas);
B. print {$kansas}=>(capital);
C. print (capital)<={$kansas};
D. print $kansas->{'capital'};
Correct Answer: D
Q4. Consider the following program code $Animal - 'Dogs bark'; package Cat; $Animal = 'Cats purr'; { package Fish; $Animal - 'Fish swim'; } package main; print $Animal; What is the result of executing this program code?
A.The code will fail at line 4.
B. The code will output the following Dogs bark
C. The code will output the following Cats purr
D. The code will output the following Fish swim
Correct Answer: B
$ 39
Reviews
There are no reviews yet.