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

Answers were Sorted based on User's Feedback



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

Answer / vamshi krishna

write a code that checks area of triangle formula i.e
x1(y3-y2)+x2(y1-y3)+x3(y2-y1)=0.

if zero points lie on same line

Is This Answer Correct ?    27 Yes 2 No

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

Answer / 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

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

Answer / 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 ?    10 Yes 5 No

Post New Answer

More C Interview Questions

Tell me what are bitwise shift operators?

0 Answers  


#include <stdio.h> void main() { int i=-1,j=1,k,l; k=!i&&j; l=!i||j; printf ("%d%d",k,l) ; }

3 Answers   SRG,


WAP &#8211; represent a char in binary format

4 Answers   Motorola, Wipro,


What are the advantages of union?

0 Answers  


Why is struct padding needed?

0 Answers  






Is c is a low level language?

0 Answers  


What is ponter?

0 Answers   TCS,


What is linear search?

0 Answers  


write a program that will read the temperature in Celsius and convert that into Fahrenheit.

1 Answers  


The code is::::: if(condition) Printf("Hello"); Else Printf("World"); What will be the condition in if in such a way that both Hello and world are printed in a single attempt?????? Single Attempt in the sense... It must first print "Hello" and it Must go to else part and print "World"..... No loops, Recursion are allowed........................

14 Answers   HOV Services, IBM, Potty,


what is the function of void main()?

8 Answers  


Why c++ is called c++ and not c+?

9 Answers   EBS,


Categories