Computational Physics MCQ Final Key
Computational Physics MCQ Final Key
Ans: 7
After each iteration in bisection method we need to choose new intervel. Does the given script is
correct ? If ( f0 * f < 0 ) (x0 = x ) (x1 = x )
Ans : no correct
The open root finding method that does not guaranteed root convergence is
In simpsons rule the most basic condition is total number of interval should be
Ans : even
What is the output of following code if ( 1! = 1 || 2! =2 || 3! =3 ) count << good else count << bad
How many times the following code prints c++ in the out put int n= 1 while n<10
Ans : 9
If f(x0 _f(x1)<0 then the relation x=x0 - (X0 -x1) * f0 / ( f0-f1) indicates
If the function g has a fixed point at p then the function defined by f(x)= x-g(x) has a ------- at p
Ans : y= x intersection
What is the final number of iteration of following program int n=8 for (int i =1 i<n i** )
Ans : 3
Ans : 3.75
The newton raphson method of finding roots of nonlinear equations falls under the category of which of
the following methods
Ans :open
What does the following code diplay on the screen (x=o ++x cout << " * " << x << *** )
Ans : *1
Ans : f1- f0
What is the final number of iteration of following program int n=8 for ( int i= 1
i <= n i= i+2 )
Ans : 8
Any point in the trapezoidal rule can be approximated using i initial limit as
Ans : x0 + 0.5* xn
While solving by gauss seidal method , which of the following is the first iterative solution system x - 2y =
1 and x + 4y = 4 ?
Ans : (1 , 0.75 )
What is the value of z is the following statements in c++ (int x,y,z x=15/4 y=13/4 z=x+y )
Ans : 7
Fixed point iteration required one initial point which should be such that |g(x)| is ......
Ans : 0
Most efficient method used for numerical solution of ordinary differential equation is
What is the output of the following code if ( 1==1 && 2<2 && 3==3 ) cout << good else cout << bad
Ans : Good
In Gauss jordan method ratio = a[j][i]/a[i][i] is usually found for all the elements except .............
Ans : i = j
How many times the following code prints c++ in the out put : int n=0 ; while (n <= 10) {n= n+2 ; cout <<
c++}
Ans : 6
( Answer is sequence)
For A = 50 % 4 what will be the value of x after executing this statement x = ( A > 50) ? 1:0
Ans : 12
In bisection method if for initial limits a and b if f(a) * f(b) > 0 what does it indicates?
Ans : b is root
Ans : for
Which of the following operators is used as assignment statement
Ans: =
Ans : do while
How many predictor and corrector steps does the fourth order Runge - kutta method use
What is the output of following code ? Int p, q , r ; p=11 ; q =9 ; r = 3 if ((p+q) < 14 || r<q - 3)
Ans : 3
What is the output of following code ? Int p,q,r p=9 ; q= 4 r= 3 if ((p+q) <14 || r<q-3)
Ans : 9
Ans : 3
Which loop structure always executes at least once even the termination condition occurs from 1st
iteration?
Ans : iomanip
Ans : computation in jacobi can be done in parallel but not in gauss seidal
What is the output of following code ? Int p, q , r ; p=11 ; q =4 ; r = 3 if ((p+q) < 14 && r<q - 3)
Ans : 11
Ans : 1
If we have two matrices MatA and MatB what will be the output of the following program ...... Int
MatA[3][3] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ; ............... Int MatB[3][3] = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 } ;
MatC [2][1] = Mat A [2][1] ;
Ans : 11
The reduced form of the matrix in Gauss Elimination method is also called.......
Ans : 4
The over and under estimation of area under the curve in trapezoidal method can be avoided by
Ans : logical
X is a root of equation
Ans : (f(x) = 0)