PHP Programming/ 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 ?
*
*  *
*  *  *
*  *  *  *
*  *  *  *  *
*  *  *  *  *  *
*  *  *  *  *
*  *  *  *
*  *  *
*  *
*
Answres-
Q4 -Write a program for this pattern ?
*****
*****
*****
*****
*****
Answer-
Q5- How to find a factorial of a number ?
Answer- 
Q 6- How to find whether a number prime or not ?
Answer-
Q 7- How to find whether a number armstrong or not ?
Answer- An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself.
For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
Q 8- How to find  whether a year leap year or not ?
Answer-
Q9 -Write a program for this pattern(number pyramid) ?
1
22
333
4444
55555
Answer-
Q 10- How to print a number reverse ?
Answer –
Q11 – Swap two values without third variable ?
Answer –

Anuj Kumar

I'm Anuj kumar a web developer with 4+ year experience .I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to is provide php , jquery , mysql , phpoops and other web development tutorials. I am trying best effort to make PHPGurukul useful for every single moment spend on this website. If you think this website is useful to visit please share with your friend and buddies.

Recommended Tutorials for you

You may also like...

10 Responses

  1. HELLO SIR,
    I m Website designer and i ask one question . i want every user click on button add on +1 in Previous value and update in sql

  2. A great example of PHP concepts.
    Thanks a lot.
    Keep it up.

  3. A great example of PHP concepts.
    Thanks a lot.
    Keep it up.

  4. HELLO SIR,
    I m Website designer and i ask one question . i want every user click on button add on +1 in Previous value and update in sql

Leave a Reply

Your email address will not be published. Required fields are marked *