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 |
Explain how do you search data in a data file using random access method?
Differentiate between new and malloc(), delete and free() ?
What is typedef?
How to reverse alternate words in a given line of string For Eg: my name is narasimha output : my eman is ahmisaran
Explain what is the benefit of using #define to declare a constant?
What is c language in simple words?
what is the output of the below code? main( ) { printf ( "\nOnly stupids use C?" ) ; display( ) ; } display( ) { printf ( "\nFools too use C!" ) ; main( ) ; }
What is difference between class and structure?
how would a 4*3 array A[4][3] stored in Row Major Order?
Does free set pointer to null?
a c code by using memory allocation for add ,multiply of sprase matrixes
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