Ask @rasansmn:

Write an algorithm to find whether a number is Palindrome or not.

public static Boolean IsPalindrom(int[] abc)
{
int a, b;
for (a = abc.Length-1, b = 0; b < abc.Length-1 / 2; a--, b++)
{
if (abc[a] != abc[b])
{
return false;
}
}
return true;
}

View more

Check whether a variable not defined or zero in JS.

if(typeof(x)=='undefined' || x==0){
document.write('x is either 0 or not defined');
}

View more

Generate below pattern using loops. * * * * * * * * * * * * * * * *

for(r=1; r<=7; r=r+2){
for(s=1; s<=r; s++){
document.write('* ');
}
document.write(' ');
}

View more

There are two tables as Customers and Orders connected through foreign keys. Write a SQL Query to list all customers with the highest purchase amount of orders. Ex: If a customer has 3 orders 100, 300, 500 as purchase amounts, the list should display details of 500 order along with customer details.

SELECT [c].[id], [c].[cus_name], [o].[id], [o].[amount] FROM [customer] [c] INNER JOIN [order] [o] ON c.id=o.customer_id WHERE O.amount IN (SELECT MAX(amount) FROM [order] GROUP BY [customer_id])

View more

What color socks are you wearing right now? PAP!

Blue colour

View more

If a snail doesn't have a shell, is it homeless or naked?

homeless

View more

What's more valuable, brains or beauty?

Brains. Brains will make you beautiful.

View more

What is the first thing you do after waking up?

Checking time on mobile.

View more

Do you like or dislike spicy food?

I like spicy food.

View more

Favorite 5 people on ASKfm ?

@VelmaD Enough?

View more

What is your main rule?

Focused on quality.

View more

What are your hobbies?

Reading, Programming, Surfing Internet

View more

What would you do if you meet an alien?

Depends on alien type.

View more

How do you relax at the end of the day?

I can't find any other way than sleep.

View more

Would you rather be a vampire or a werewolf?

Werewolf

View more

If dogs never existed, which animal would take its place as Man's Best Friend?

Cat is the best friend.. and my favorite.

View more

Do you believe in karma?

No!

View more

How patriotic are you?

I am not patriotic.

View more

On a scale of 1 to 10, how well do you sing?

5? I believe I can develop it more for some extent. :D

View more

Will humans ever live on another planet?

Yes, may be. Within an artificial environment?

View more

Would you prefer a party with a few friends or lots of friends?

With a few friends.

View more

Are antismoking ads effective?

Not at all. Smokers will quit smoking when society start to admire non smoking personalities. Just throwing insults to the smokers will not convince the right message.

View more

Can you recommend anything to read?

I recommend to read blogs I follow on blogger and wordpress.
https://www.blogger.com/profile/11451987039124436849

View more

If you feel stressed what would you do to reduce it?

I avoid doing what make me stress

View more

Xbox or PlayStation?

Neither at the moment. I'm not a gameholic.

View more

Next