ExamVeda
Login
Home
Miscellaneous on Data Structures
?

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; 
}

Answer & Solution
Correct Answer: Option D
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.