a 'c' program to tell that the set of three coordinates lie
on a same line
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
What are called c variables?
What is the significance of c program algorithms?
what is the use of bitfields & where do we use them?
How does sizeof know array size?
What are the preprocessors?
wat s the meaning of (int *)p +4;
find the sum of two matrices and WAP for it.
I have a varargs function which accepts a float parameter?
What is unsigned int in c?
Explain how do you determine whether to use a stream function or a low-level function?
How do you determine the length of a string value that was stored in a variable?
What is define directive?