Question 21
Question 22
Question 23
Which of the following is false regarding the evaluation of computer programming languages ?
Question 24
#include <stdio.h> main( ) { int i, inp; float x, term=1, sum=0; scanf(“%d %f ”, & inp, &x); for(i=1; i<=inp; i++) { term = term * x/i; sum = sum + term ; } printf(“Result = %f\\n”, sum); }The program computes the sum of which of the following series?
Question 26
main ( ) { char S[ ] = "ABCDEFGH"; printf ("%C", *(&S[3])); printf ("%s", S + 4); printf ("%u", S); /* Base address of S is 1000 */ }
Question 28
subroutine swap(ix,iy) it = ix L1 : ix = iy L2 : iy = it end ia = 3 ib = 8 call swap (ia, ib+5) print *, ia, ib endS1: The compiler will generate code to allocate a temporary nameless cell, initialize it to 13, and pass the address of the cell to swap S2: On execution the code will generate a runtime error on line L1 S3: On execution the code will generate a runtime error on line L2 S4: The program will print 13 and 8 S5: The program will print 13 and -2 Exactly the following set of statement(s) is correct:
Question 29
function F(K : integer) integer; begin if (k<3) then F:=k else F:=F(k-1)*F(k-2)+F(k-3) end;
There are 35 questions to complete.