Home / MCQ Bank / Computer
Computer Computer Fundamental Miscellaneous Difficulty: Medium

What type of computer programming is used for airplane ticket reservation system?

Select the correct option to test your answer:

More Computer Questions

Which of these keywords must be used to handle the exception thrown by try block in some rational manner? What is the process of transforming raw data into a structured format suitable for analysis called? In Java, can a "catch" block catch exceptions of a superclass type? What will be the output of the following C++ code? #include <iostream> #include <string> using namespace std; class Mammal { public: virtual void Define(){ cout<<"I'm a Mammal\n"; } }; class Human: public Mammal { public: void Define(){ cout<<"I'm a Human\n"; } }; class Male: public Human { public: void Define(){ cout<<"I'm a Male\n"; } }; class Female: public Human { public: void Define(){ cout<<"I'm a Female\n"; } }; int main(int argc, char const *argv[]) { Mammal *M = new Mammal(); Male m; Female f; *M = m; M->Define(); M = &m; M->Define(); return 0; } What is the time complexity of the following dynamic programming implementation of the matrix chain problem? #include<stdio.h> #include<limits.h> int mat_chain_multiplication(int *mat, int n) { int arr[n][n]; int i,k,row,col,len; for(i=1;i<n;i++) arr[i][i] = 0; for(len = 2; len < n; len++) { for(row = 1; row <= n - len + 1; row++) { col = row + len - 1; arr[row][col] = INT_MAX; for(k = row; k <= col - 1; k++) { int tmp = arr[row][k] + arr[k + 1][col] + mat[row - 1] * mat[k] * mat[col]; if(tmp < arr[row][col]) arr[row][col] = tmp; } } } return arr[1][n - 1]; } int main() { int mat[6] = {20,5,30,10,40}; int ans = mat_chain_multiplication(mat,5); printf("%d",ans); return 0; }