This set of Data Structures & Algorithms Multiple Choice Questions & Answers (MCQs) focuses on “Cross Product”.
1. Cross product is a mathematical operation performed between ________________ a) 2 scalar numbers b) a scalar and a vector c) 2 vectors d) any 2 numbers
View Answer
Answer: c
Explanation: Cross product is a mathematical operation that is performed on 2 vectors in a 3D plane. It has many applications in computer programming and physics.
2. Cross product is also known as? a) scalar product b) vector product c) dot product d) multiplication
View Answer
Answer: b
Explanation: Cross product is also known as a vector product. It is a mathematical operation that is performed on 2 vectors in 3D plane.
3. What is the magnitude of resultant of cross product of two parallel vectors a and b? a) |a|.|b| b) |a|.|b| cos(180) c) |a|.|b| sin(180) d) 1
View Answer
Answer: c
Explanation: The resultant of cross product of 2 parallel vectors is always 0 as the angle between them is 0 or 180 degrees. So the answer is |a|.|b| sin(180).
4. What is the general formula for finding the magnitude of the cross product of two vectors a and b with angle θ between them? a) |a|.|b| b) |a|.|b| cos(θ) c) |a|.|b| sin(θ) d) |a|.|b| tan(θ)
View Answer
Answer: c
Explanation: The general formula for finding the magnitude of cross product of two vectors is |a|.|b| sin(θ). Its direction is perpendicular to the plane containing a and b.
5. The concept of cross product is applied in the field of computer graphics. a) true b) false
View Answer
Answer: a
Explanation: The concept of cross product find its application in the field of computer graphics. It can be used to find the winding of polygon about a point.
Check this: Data Structure MCQ | Computer Science Books
6. Which of the following equals the a x b ( a and b are two vectors)? a) – (a x b) b) a.b c) b x a d) – (b x a)
View Answer
Answer: d
Explanation: The vector product a x b is equal to – (b x a). The minus sign shows that these vectors have opposite directions.
7. Cross product of two vectors can be used to find? a) area of rectangle b) area of square c) area of parallelogram d) perimeter of rectangle
View Answer
Answer: c
Explanation: Cross product of two vectors can be used to find the area of parallelogram. For this, we need to consider the vectors as the adjacent sides of the parallelogram.
8. The resultant vector from the cross product of two vectors is _____________ a) perpendicular to any one of the two vectors involved in cross product b) perpendicular to the plane containing both vectors c) parallel to to any one of the two vectors involved in cross product d) parallel to the plane containing both vectors
View Answer
Answer: b
Explanation: The resultant vector from the cross product of two vectors is perpendicular to the plane containing both vectors. In other words, it should be perpendicular to both the vectors involved in the cross product.
9. What will be the cross product of the vectors 2i + 3j + k and 3i + 2j + k? a) i + 2j + k b) 2i + 3j + k c) i + j – 5k d) 2i – j – 5k
View Answer
Answer: c Explanation: We can find the cross product of the given vectors by solving the determinant.
10. What will be the cross product of the vectors 2i + 3j + k and 6i + 9j + 3k? a) i + 2j + k b) i – j – 5k c) 0 d) 2i – j – 5k
View Answer
Answer: c
Explanation: The given vectors are parallel to each other. The cross product of parallel vectors is 0 because sin(0) is 0.
11. Find the output of the following code.
#include <bits/stdc++.h> using namespace std; void crossP(int A[], int B[], int cross[]) { cross[0] = A[1] * B[2] - A[2] * B[1]; cross[1] = A[0] * B[2] - A[2] * B[0]; cross[2] = A[0] * B[1] - A[1] * B[0]; } int main() { int A[] = { 1, 2, 4 }; int B[] = { 2, 3, 2 }; int cross[3]; crossP(A, B, cross); for (int i = 0; i < 3; i++) cout << cross[i] << " "; return 0; }
a) 1 2 5 b) -1 -5 -3 c) -6 -8 -1 d) -8 -6 -1
View Answer
Answer: d
Explanation: The given code calculates the cross product of the vectors stored in arrays A and B respectively. So the output will be -8 -6 -1.
12. Which of the following operation will give a vector that is perpendicular to both vectors a and b? a) a x b b) a.b c) b x a d) both a x b and b x a
View Answer
Answer: d
Explanation: The resultant vector from the cross product of two vectors is perpendicular to the plane containing both vectors. So both a x b and b x a will give a vector that is perpendicular to both vectors a and b.
Sanfoundry Global Education & Learning Series – Data Structures & Algorithms.
To practice all areas of Data Structures & Algorithms, here is complete set of 1000+ Multiple Choice Questions and Answers.
Next Steps:
- Get Free Certificate of Merit in Data Structure II
- Participate in Data Structure II Certification Contest
- Become a Top Ranker in Data Structure II
- Take Data Structure II Tests
- Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.