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

write a program which counts a product of array elements lower than 10.

1 Answers  


wap to print "hello world" without using the main function.

22 Answers   TCS, Wipro,


Is c call by value?

0 Answers  


Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.

3 Answers   Google, Infosys, JTL, OpenFeel,


Write a program to check whether a number is prime or not using c?

0 Answers  






What are terms in math?

0 Answers  


what is default constructor?

2 Answers   HCL,


write a program for fibonaci series by using while loop in c?

2 Answers  


Can we add pointers together?

0 Answers  


c program to manipulate x=1+3+5+...+n using recursion

2 Answers   Wipro,


what is difference between procedural language and functional language ?

4 Answers   Wipro,


int main() { int x = (2,3,4); int y = 9,10,11; printf("%d %d",x,y); } what would be the output?

7 Answers   Parimal, Wipro,


Categories