Top 10 PHP Logical Interview questions and answers
Today We discuss the PHP Logical Interview Question and answer.if you are fresher or experience its help you to your interview.
Top 10 PHP Logical Interview questions and answers
Q 1. Write a program for this pattern ?
* * * * *
* * * *
* * *
* *
*
Answer
Q2 -Write a program for this pattern ?
*
* *
* * *
* * * *
* * * * *
Answer-
Q3 -Write a program for this pattern ?
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * *
* * * *
* * *
* *
*
Answer-
Q4 -Write a program for this pattern ?
*****
*****
*****
*****
*****
Answer-
Q 5 — Swap two values without third variable ?
Answer-
Swap two values without third Variable
Number 1 :
Number 2 :
Q 6 -Write a program for this pattern(number pyramid) ?
1
22
333
4444
55555
Answer-
Number Pyramid
Q 7- How to print a number reverse ?
Answer-
Reverse of a number
Number :
Q 8- How to find whether a year leap year or not ?
Answer-
Leap year
Year :
Q 9- How to find whether a number armstrong or not ?
For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
Answer-
Whether a number Armstrong or not
Number :
Q 10- How to find whether a number prime or not ?
Answer-
Check whether a number prime or not
Number :
Q 11- How to find a factorial of a number ?
Answer-
Factorial of any number
Number :
More Interview Question Answer Articles-