Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

a 'c' program to tell that the set of three coordinates lie
on a same line

Answer Posted / chetan kole

m1=(y2-y1)/(x2-x1);
m2=(y3-y2)/(x3-x2);
if(m1==m2)
{
printf("3 points are on same line")
}
else
{
printf("not on same line");
}

Is This Answer Correct ?    19 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

1080


Why c is called procedure oriented language?

1029


How arrays can be passed to a user defined function

1007


What are the two types of structure?

1077


How can I call fortran?

1028


What is the difference between variable declaration and variable definition in c?

1044


What is c language and why we use it?

1054


What is the difference between far and near ?

1183


What is a pointer and how it is initialized?

1140


What is difference between scanf and gets?

1249


Write a program to check palindrome number in c programming?

1002


Explain how do you determine the length of a string value that was stored in a variable?

1143


Explain why can’t constant values be used to define an array’s initial size?

1342


What are the usage of pointer in c?

1179


What is the use of static variable in c?

1080