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

How does free() know explain how much memory to release?

0 Answers  


Write a program using bitwise operators to invert even bits of a given number.

2 Answers  


what is the code to display color fonts in the output?

1 Answers  


How many types of operators are there in c?

0 Answers  


Is array a primitive data type in c?

0 Answers  






how many error occurs in C language ?

22 Answers   Infosys, Wipro,


What is pointer and structure in c?

0 Answers  


What are the uses of null pointers?

0 Answers  


Can we access RAM? How? Whats the range of access? Similarly What are other hardware we can access?

1 Answers  


write a program for the normal snake games find in most of the mobiles.

0 Answers   Accenture, Wipro,


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

0 Answers   Wilco,


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

0 Answers   College School Exams Tests,


Categories