Posts

Showing posts from August 31, 2014

My UPSC Engineering Services (IES) Interview

More than a year back I had an extraordinary opportunity to attend the so-called sacred and tough UPSC Interview board after clearing the gruelling written exam (in Gen Category- its always gruesome) . Since I was pretty excited about it and hence planned it well also. I booked a good hotel in the vicinity of UPSC and checked in to it a day before to settle in there. Since I was in job and had nobody to guide me, my plannings and preparations were all mine and since it made me successful I now think yes they were right.  I got up early that day had morning ablutions and got ready in ultra formal attire ! Light blue shirt and dark color trousers and a matching tie. I was looking as if I am heading towards my meeting as I usually do when in BHEL but this time it was something different- that was my rendezvous with UPSC !  I reached the venue quite early to see many veterans ( multiple timers) discussing what was asked last year and what mistakes they committed and how they were

FORTRAN Yearwise Questions -IES

2008 Which one of the following statements about FORTRAN is not correct? a. GO TO 999 b. CONTINUE 999 c. PRINT 999 d. DIMENSION A (999) 119. If A is greater than B then it is expressed in FORTRAN as: a. A > B b. AGTB c. A.GT.B d. AGT.B 2007 87. The arithmetic expression 2.4**3.0 will be computed by the FORTRAN compiler as: a. 2.4*2.4*2.4 b. 103.0 log 102.4 c. e3.0 log e2.4 d. 2.4*2.4*3.0 2006 58. Given J = 2, K = –4, A = –5, B = 0.4, C = 10.5 What are the values of the FORTRAN variables JIP = J*K + J**K, IVAL = A + B + C ? a. 15.3 and 5.9, respectively b. –7.83 and 5.9, respectively c. –7.83 and 5, respectively d. –8 and 5, respectively 2005 60. The initial contents of an array A are: A= [2 7 8 6 15 14 0 50 3] What would be the contents of the array A after executing the following segment of the FORTRAN code? DO 35 J = 1, T,1 TEMP = A(J) A(J) = A(J+2) A(J+1) = TEMP 35 CONTINUE a. A= [7 2 8 6 14 15 50 0 3] b. A= [8 6 2 7 0 50 15 14 3] c. A

UPSC IES -FORTRAN @ a Glance

FORTRAN @ Glance Declarations Syntax : ·    The type declaration statement indicates the type and name of the variable or constant (note the two colons between the type and the name of the variable or constant). Named constants must be declared with the parameter attribute: real, parameter:: pi = 3.1415927 ·    Like named constants, variables must be declared at the beginning of a program (or subprogram) in a type declaration statement: integer :: total real :: average1, average2 ! this declares 2 real values complex :: cx logical :: done character(len=80) :: line ! a string consisting of 80 characters ·       Constants can be assigned trivially to the complex number cx: cx = (1.0, 2.0) ! cx = 1.0 + 2.0i If you need to assign variables to cx, you need to use cmplx : cx = cmplx (1.0/2.0, -3.0) ! cx = 0.5 – 3.0i cx = cmplx (x, y) ! cx = x + yi The function cmplx is one of the intrinsic functions ·       Arrays real, dimension(5) :: vector ! 1-dim.real