COMPUTATIONAL PHYSICS ANSWER KEY
Newton formula find the root graphicaly by
Ans : tagent line
What is the value of z after following statement in c++(int x y z
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
Ans : bisection method
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
Ans : Good 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
Ans : newton method
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 : exact root
The point at wich value of function is equal to p is the point where
Ans : y= x intersection
Which of the following is an assumption of jacobi method ?
Ans : he coefficient matrix has no zeros on its main integral
What is the final number of iteration of following program int n=8 for (int i =1 i<n i** )
Ans : 3
What is the value of x after following statement in c++ ( float x x= 15/4 )
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
Delta can be defined as
Ans : f1- f0
Realtion operators allowed you to
Ans : compare number
The method requires bracketing method to find root of a function is
Ans : Regular false method
What is the final number of iteration of following program int n=8 for ( int i= 1
i <= n i= i+2 )
Ans : 8
For adding two matrix they must have
Ans : same number of rows and same number of columns
Numerical techniques of find root are more commonly involve ----
Ans : iterative method
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
The iteration formula for newton raphson method is given by ____
Ans : x1 = x0 - f(x0) / f' (x0)
Most efficient method used for numerical solution of ordinary differential equation is
Ans : Euler method
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
The number of columns of product matrix of two matrices is equal to
Ans : row of 2nd matrix
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
Which programming structure executes program statements in order
Ans : none of these
( 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
If you want 20 iterations which loop is best of it
Ans : for
Which of the following operators is used as assignment statement
Ans: =
Which loop structure always executes at leats once ?
Ans : do while
How many predictor and corrector steps does the fourth order Runge - kutta method use
Ans : two predictor and two corrector steps
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
What is the length of the following array n ...... Int n [ ] = (56 , 90 , 25 )
Ans : 3
Which loop structure always executes at least once even the termination condition occurs from 1st
iteration?
Ans :do while
Setprecision keyword requires the use of header files
Ans : iomanip
What is the main difference between jacobi and Gauss seidal
Ans : computation in jacobi can be done in parallel but not in gauss seidal
In c++ program the equation are usually written using ____
Ans : include directive
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
An ordinary differential equation has ..... Independent variable
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 : row echelon form
Assuming T [5] = { 1,2,3,4} what is the value of T[4]
Ans : 4
The over and under estimation of area under the curve in trapezoidal method can be avoided by
Ans : taking curved
The error in the following code is ......... If ( a>b) ; a= b ; else b= a
Ans : logical
X is a root of equation
Ans : (f(x) = 0)
The key difference regular falsi and secent method
Ans : lebling method