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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 'bus error'?

651


Define the scope of static variables.

608


What is #line used for?

584


How many types of operator or there in c?

607


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

717






Hi can anyone tell what is a start up code?

1622


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

774


Explain the use of 'auto' keyword

683


What is the purpose of sprintf() function?

609


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1543


What is #include called?

575


What is dynamic variable in c?

571


Explain union.

641


How can I make sure that my program is the only one accessing a file?

687


What are header files in c?

622