Computer Laboratory



:: Home : CV : Teaching : Research : Publications : Presentations : Leisure ::


Lectures

Codes

Study Materials

  • C programming language - Kerninghan and Ritchie.
  • Computer Oriented Numerical Methods - V. Rajaraman.
  • Computational Physics - D.Walker.

Topics

  • Language: Constants and variables. Assignment and arithmetic expressions. Logical expressions and control statements, loops, array, input and output statements (with I, F and E formats), function subprogram, subroutine.
  • Numerical analysis: Computer arithmetic and errors in floating point representation of numbers, different numerical methods for the following problems: (Group-A)
    • Sorting: arranging in ascending/descending order.
    • Read N numbers ,find their mean, median, mode.
    • Find whether a number is prime, factorize a number.
    • Solution of a quadratic equation with real / complex roots.
    • Sum of different types of series term by term with a specified accuracy.
    • Simple matrix operations (addition, subtraction, multiplication, transpose).
    (Group-B)
    • Solution of simultaneous linear equations by Gauss-Siedel method.
    • Least square fit of a given set of data to a straight line, application to exponential ( y=aex) and power ( y=axb) laws.
    • Finding zeroes of a given function by the method of bisection and Newton-Raphson.
    • Interpolation by Lagrange's method.
    • Integration by trapezoidal and Simpson's rule.

Remarks

  • Question Set for a few years.
  • Download DevC++ from here.
  • You can make an infinite loop with for(;;) or while(1) loop.
  • If given Linux (OS), then you have to manually compile and execute the codes. (a) compile : "gcc program.c -lm -o wxyz" [gcc is the compiler that will compile program.c, by linking math library (-lm), to produce an executable of your choice "wxyz"], (b) execute : ./wxyz.
    • If you skip "-o wxyz" part, then default executable generated after compilation will be "a.out". Then you have to do ./a.out for execution.
  • (Outside the course) If you seek next level of computing: Try solving Diffusion Process.