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

Explain how do you search data in a data file using random access method?

0 Answers  


Differentiate between new and malloc(), delete and free() ?

0 Answers   iNautix,


What is typedef?

1 Answers  


How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran

0 Answers  


Explain what is the benefit of using #define to declare a constant?

0 Answers  


What is c language in simple words?

0 Answers  


what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }

3 Answers  


What is difference between class and structure?

0 Answers  


how would a 4*3 array A[4][3] stored in Row Major Order?

0 Answers   HCL, Ignou,


Does free set pointer to null?

0 Answers  


a c code by using memory allocation for add ,multiply of sprase matrixes

0 Answers  


4)What would be the output? main() { int num=425; pf("%d",pf("%d",num)); } a)Comp error b)4425 c)4253 d)3435 e)none

10 Answers  


Categories