Explore topic-wise MCQs in Testing Subject.

This section includes 657 Mcqs, each offering curated multiple-choice questions to sharpen your Testing Subject knowledge and support exam preparation. Choose a topic below to get started.

1.

What will be the output of the following PHP code?<?phpfunction Add($n1, $n2) { $total = $n1 + $n2; echo chr($total); }$var = "Add";$var(14, 41); ?>

A. 7
B. 41
C. 14
D. 55
E. None of these
Answer» B. 41
2.

What will be the output of the following PHP code?<?phpfunction Add($n1, $n2) { $total = $n1 + $n2; echo cos($total); }Add(10,-10); ?>

A. 0
B. 1
C. Error
D. Nothing
E. None of these
Answer» C. Error
3.

What will be the output of the following PHP code?<?phpdefine("GREETING1","Welcome to interview mania!");define("GREETING2","Welcome to interview mania!");define("GREETING3","Welcome to interview mania!");echo defined("GREETING");?>

A. "GREETING Welcome to interview mania! " 3 times
B. Error
C. "Welcome to interview mania!" 3 times
D. Nothing
E. None of these
Answer» E. None of these
4.

What will be the output of the following PHP code?<?phpecho lcfirst("HELLO FRIENDS");?>

A. HELLO FRIENDS
B. hello friends
C. Hello Friends
D. hELLO FRIENDS
E. None of these
Answer» E. None of these
5.

What will be the output of the following PHP code?<?phpecho lcfirst("WELCOME TO INTERVIEW MANIA!");?>

A. WELCOME TO INTERVIEW MANIA!
B. welcome to interview mania!
C. Welcome To Interview Mania!
D. WELCOME to interview mania!
E. wELCOME TO INTERVIEW MANIA!
Answer» F.
6.

What will be the output of the following PHP code?<?phpfunction fun($message) { echo "$message"; }$var = "fun";$var("Executed...");?>

A. message
B. Error
C. Nothing
D. Executed...
E. None of these
Answer» E. None of these
7.

What will be the output of the following PHP code?

A. $msg
B. This will execute...
C. Error
D. 0
E. None of these
Answer» C. Error