250+ TOP MCQs on Line Point Distance and Answers

Data Structures & Algorithms Multiple Choice Questions on “Line Point Distance”.

1. The shortest distance between a line and a point is achieved when?
a) a line is drawn at 90 degrees to the given line from the given point
b) a line is drawn at 180 degrees to the given line from the given point
c) a line is drawn at 60 degrees to the given line from the given point
d) a line is drawn at 270 degrees to the given line from the given point

Answer: a
Clarification: The shortest distance between a line and a point is achieved when a line is drawn at 90 degrees to the given line from the given point.

2. What is the shortest distance between the line given by ax + by + c = 0 and the point (x1,y1)?
a) line-point-distance-multiple-choice-questions-answers-mcqs-q2a
b) line-point-distance-multiple-choice-questions-answers-mcqs-q2b
c) line-point-distance-multiple-choice-questions-answers-mcqs-q2c
d) ax1+by1+c
View Answer

Answer: a
Clarification: The shortest distance between a line and a point is given by the formula (ax1+by1+c)/(√a2+b2). This formula can be derived using the formula of area of a triangle.

3. What is the shortest distance between the line given by -2x + 3y + 4 = 0 and the point (5,6)?
a) 4.5 units
b) 5.4 units
c) 4.3 units
d) 3.3 units

Answer: d
Clarification: The shortest distance between a line and a point is given by the formula (ax1+by1+c)/(√a2+b2). Using this formula we get the answer 3.3 units.

4. What is the general formula for finding the shortest distance between two parallel lines given by ax+by+c1=0 and ax+by+c2=0?
a) line-point-distance-multiple-choice-questions-answers-mcqs-q2a
b) line-point-distance-multiple-choice-questions-answers-mcqs-q4b
c) line-point-distance-multiple-choice-questions-answers-mcqs-q4c
d) c1+c2
View Answer

Answer: b
Clarification: The general formula for finding the shortest distance between two parallel lines given by ax+by+c1 and ax+by+c2 is (c1-c2)/(√a2+b2). We can find this by considering the distance of any one point on one of the line to the other line.

  250+ TOP MCQs on Atbash Cipher and Answers

5. What is the distance between the lines 3x-4y+7=0 and 3x-4y+5=0?
a) 1 unit
b) 0.5 unit
c) 0.8 unit
d) 0.4 unit

Answer: d
Clarification: As the given lines are parallel so the distance between them can be calculated by using the formula (c1-c2)/(√a2+b2). So we get the distance as 0.4 unit.

6. What will be the slope of the line given by ax + by + c = 0?
a) -a/b
b) -b/a
c) -c/a
d) a/c

Answer: a
Clarification: The slope of a line given by the equation ax + by + c=0 has the slope of -a/b. So two lines having the same ratio of the coefficient of x and y will be parallel to each other.

7. What will be the slope of the line given by 10x + 5y + 8=0?
a) -5
b) -2
c) -1.25
d) 5

Answer: b
Clarification: The slope of a line given by the equation ax + by + c=0 has the slope of -a/b. So the slope of the given line will be -2.

8. What will be the co-ordinates of foot of perpendicular line drawn from the point (-1,3) to the line 3x-4y-16=0?
a) (1/5,2/5)
b) (2/25,5/25)
c) (68/25,-49/25)
d) (-49/25,68/25)

Answer: c
Clarification: The foot of perpendicular can be found by equating the distance between the two points and the distance between point and line. This is found to be (68/25,-49/25).

9. Which of the following is used to find the absolute value of the argument in C++?
a) abs()
b) fabs()
c) mod()
d) ab()

  250+ TOP MCQs on Bead Sort and Answers

Answer: b
Clarification: In C++ the absolute value of an argument can be found by using the function fabs(). It is available under the header file math.h.

10. What will be the slope of the line perpendicular to the line 6x-3y-16=0?
a) 1/2
b) -1/2
c) 2
d) -2

Answer: b
Clarification: For two lines to be perpendicular the product of their slopes should be equal to -1. So as the slope of given line is 2 so the slope of line perpendicular to it will be -1/2.

11. Find the output of the following code.

#include 
#include
using namespace std;
void distance(float x, float y, float a, float b, float c) 
{ 
	float d = fabs((a * x + b * y + c)) / (sqrt(a * a + b * b)); 
	cout<<d;
	return; 
} 
int main() 
{ 
	float x = -2; 
	float y = -3; 
	float a = 5; 
	float b = -2; 
	float c = - 4; 
	distance(x, y, a, b, c); 
	return 0; 
}

a) 2.8
b) 1.8
c) 1.4
d) 2.4

Answer: c
Clarification: The given code calculates the shortest distance between line and a point. So the output will be 1.4.

& Algorithms.

and Answers.

contest

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top