.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Santhakumar Munuswamy
Fauzul Azmi

Home >> Interview Question >> Aptitude >> Post New Question Subscribe to Interview Questions

A person has certain number of cows and birds.they have 172 eyes and 344 legs.how many cows and birds does he have?

Posted By :Subhransu Sekhar Jena     Posted Date :November 21, 2014    Points :40   Category :Aptitude 
2. Each Cow has 2 eyes and 4 legs and each bird has 2 eyes and 2 legs. Lets call each eye as x and each leg as y. Also each bird is n and each cow is m so:
n(2x+2y) + m(2x + 4y) = 172x + 344y
2x (n+m) + 2y(n+2m) = 172x + 344y
(n+m) = 86 and (n+2m) = 172
n = 86 - m
86 - m + 2m = 172 or m = 86
This implies n = 0.
The owner has 0 birds and 86 cows.

You can also find related Interview Question to A person has certain number of cows and birds.they have 172 eyes and 344 legs.how many cows and birds does he have?  below: 

A person has 14 red socks and 14 white socks in a drawer. What is the minimum number of socks that he should take to get a correct pair?

This is a classic probability puzzle and many puzzles are based on this logic. If the person picks up two socks then there is a possibility of them being different in colour. If he picks up three socks then they are guaranteed red or white. So the minimum number of socks required are three (3).

Minimum number of queues needed to implement the priority queue?

Two. One queue is used for actual storing of data and another for storing priorities. (More...)

What is Version Number in Assembly Manifest ?

A revision and build number in an assemblies is called Version Number.

There are Major and Minor Version number in an assembly. you can change this version number in assemblyinfo.cs file
usually version number looks like this in assemblyinfo.cs

The common language run time uses these numbers to enforce version policy. (More...)

How to get IP Number of a SYSTEM?

Request.UserHostName.ToString(); (More...)

How to Find Number of Days for provided date range?

Code extract :

TimeSpan DayDifference = Convert.ToDateTime("2009-1-7").Subtract(Convert.ToDateTime("2009-1-1"));

To find the difference of the days, here we have used Subtract method. The Subtract method does not take start date into consideration. Hence, to get the exact number of days for the date range we need to add one more day to the result.

Response.Write("Number of Days : " + DayDifference.Days+1); (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend