Technical Quiz ( Round-1)

49 Questions

Settings
Please wait...
Technical Quizzes & Trivia

VISIT - JOIN THE WINNER'S WORLD. . . .


Questions and Answers
  • 1. 
    To scan a and b given below, which of the following scanf() statement will you use? #include float a; double b;
    • A. 

      Scanf("%f %f", &a, &b);

    • B. 

      Scanf("%Lf %Lf", &a, &b);

    • C. 

      Scanf("%f %Lf", &a, &b);

    • D. 

      Scanf("%f %lf", &a, &b);

    • E. 

      NONE OF THE ABOVE

  • 2. 
    #include<stdio.h>         int main()         {         char str[] = "Nagpur";         str[0]='K';         printf("%s, ", str);         str = "Kanpur";         printf("%s", str+1);         return 0;         }
    • A. 

      Kagpur, Kanpur

    • B. 

      Nagpur, Kanpur

    • C. 

      Kagpur, anpur

    • D. 

      Error

    • E. 

      NONE OF THE ABOVE

  • 3. 
    The library function used to reverse a string is
    • A. 

      Strstr()

    • B. 

      Strrev()

    • C. 

      Revstr()

    • D. 

      Strreverse()

    • E. 

      ALL OF THE ABOVE

  • 4. 
    What do the following declaration signify? int *f();
    • A. 

      F is a pointer variable of function type.

    • B. 

      f is a function returning pointer to an int.

    • C. 

      F is a function pointer.

    • D. 

      f is a simple declaration of pointer variable.

    • E. 

      NONE OF THE ABOVE

  • 5. 
    What will be the output of the program ? #include Iint main() {     char *str;     str = "%d\n";     str++;     str++;     printf(str-2, 300);     return 0; }
    • A. 

      NO OUTPUT

    • B. 

      30

    • C. 

      3

    • D. 

      300

    • E. 

      NONE OF THE ABOVE

  • 6. 
    Is this a correct way for NULL pointer assignment?       int i=0;       char *q=(char*)i;
    • A. 

      YES

    • B. 

      NO

  • 7. 
    CONSIDER THAT AN INTEGER OCCUPIES 4-BYTES THEN SIZE OF AN INTEGER ARRAY  WITH DIMENSION 11,4(2-D ARRAY) WOULD BE
    • A. 

      60

    • B. 

      176

    • C. 

      48

    • D. 

      120

    • E. 

      NONE OF THE ABOVE

  • 8. 
    THE rand( ) FUNCTION IS INCLUDED IN WHICH HEADER FILE
    • A. 

      STDIO.H

    • B. 

      STDLIB.H

    • C. 

      STRING.H

    • D. 

      MATH.H

  • 9. 
    AMONG THESE WHICH EXAMPLE CANN'T BE SOLVED BY RECURSION
    • A. 

      FINDING THE SUM OF FIRST 'N' TERMS IN SERIES

    • B. 

      TOWERS OF HANOI

    • C. 

      GENERATION OF PRIME NUMBERS

    • D. 

      REVERSING A STRING

    • E. 

      NONE

  • 10. 
    WHICH OF THESE MECHANISMS IS USED FOR REPETITIVE COMPUTATIONS IN WHICH EACH ACTION  IS STATED IN TERMS OF A PREVIOUS RESULT
    • A. 

      PASSING ARGUMENTS BY VALUE

    • B. 

      PASSING ARGUMENTS BY REFERENCE

    • C. 

      RECURSION

    • D. 

      STRUCTURES

    • E. 

      NONE

  • 11. 
    A MEMBER OF A STRUCTURE IS
    • A. 

      A STRUCTURE'S DATATYPE

    • B. 

      A POINTER TO STRUCTURE

    • C. 

      VARIABLE OF A STRUCTURE

    • D. 

      NONE

  • 12. 
    CONSTRUCTORS
    • A. 

      ARE THE SAME AS METHODS

    • B. 

      FOR ONE CLASS SHOULD ALL HAVE THE SAME PARAMETER LIST

    • C. 

      HAVE THE SAME NAME AS THEIR CLASS

    • D. 

      DO NOT TAKE PARAMETERS

  • 13. 
    FOR A SINGLE METHOD ,THE PARAMETERS CAN
    • A. 

      BE OF ALL DIFFERENT TYPES

    • B. 

      HAVE THEIR TYPE DECLARED IN THE PARAMETER LIST

    • C. 

      BE OF ALL THE SAME TYPE

    • D. 

      HAVE THEIR TYPES DECLARED IN THE BODY OF THE METHOD

    • E. 

      NONE OF THE ABOVE

  • 14. 
    Which of the following cannot be checked in a switch-case statement?
    • A. 

      Character

    • B. 

      INTEGER

    • C. 

      FLOAT

    • D. 

      ENUM

    • E. 

      ALL

  • 15. 
    WHICH OF THESE IN NOT A VALID POINTER OPERATION
    • A. 

      *P++

    • B. 

      (*P)++

    • C. 

      (P+3)

    • D. 

      2+(P*4)

  • 16. 
    WHICH OF FOLLOWING FUNCTIONS IS USED TO CLOSE A FILE
    • A. 

      FILECLOSE

    • B. 

      FCLOSE

    • C. 

      FCLOSING

    • D. 

      FCLOSED

  • 17. 
    WHICH OF THE FOLLOWING FUNCTIONS IS USED TO READ EACH MEMBER ( HAVING DIFF TYPES ) OF  A  STRUCTURE CONTAINED IN A  DATA FILE
    • A. 

      GETS

    • B. 

      FGETS

    • C. 

      FSCANF

    • D. 

      PUTS

  • 18. 
    The internal sorting techniques are essential for the data sets, which do not fit in the main memory
    • A. 

      True

    • B. 

      False

  • 19. 
    If a list contains 100 elements then the worst-case performance of this list would be
    • A. 

      100

    • B. 

      101

    • C. 

      102

    • D. 

      103

    • E. 

      None of the above

  • 20. 
    AVERAGE TIME IN WORST-CASE SITUATION IN LINEAR SEARCH IS IN THE ORDER OF
    • A. 

      N(N-1)/2

    • B. 

      N/2

    • C. 

      N

    • D. 

      1

    • E. 

      ALL

  • 21. 
    THE ELEMENTS IN SEARCH LIST SHOULD NECCESSARILY BE ORDERED IN LINEAR SEARCH
    • A. 

      TRUE

    • B. 

      FALSE

  • 22. 
    THE MAXIMUM NO.OF CHILDREN  A NODE CAN HAVE IN GENERALLY REFERRED TO AS
    • A. 

      PATH OF THE TREE

    • B. 

      LENGTH OF THE TREE

    • C. 

      DEGREE OF THE TREE

    • D. 

      ORDERED OF THE TREE

    • E. 

      NONE

  • 23. 
    WHAT IS THE OUTPUT OF THE FOLLOWING PROGRAM FRAGMENT int A[4]= {2,4,6,8}; printf("%i",a[2]);
    • A. 

      2

    • B. 

      4

    • C. 

      5

    • D. 

      6

    • E. 

      8

  • 24. 
    Public class test{ public static void main(string args[]){ int x; x=-3>>1; x=x>>>2; x=x<<1; system.out.println(x); } }
    • A. 

      1

    • B. 

      001232312

    • C. 

      2147483649

    • D. 

      2147483646

    • E. 

      None

  • 25. 
    A class contructor usually defines
    • A. 

      How an object is initialized

    • B. 

      How an object is interfaced

    • C. 

      No.of instance data in the class

    • D. 

      No.of methods in the class

    • E. 

      Both a&b

  • 26. 
    Which of the following methods are methods of the math class
    • A. 

      Absolute()

    • B. 

      Log()

    • C. 

      Cosine

    • D. 

      Sine

    • E. 

      None

  • 27. 
    Public class test{ public static void main(string args[]){ int x,y; x=-5>>2; y=x>>>2; system.out.println(y); } }
    • A. 

      5

    • B. 

      2

    • C. 

      80

    • D. 

      0

    • E. 

      64

  • 28. 
    Public class test{ public static void main(string args[]){ int i=-1; i=i>>1; system.out.println(i); } }
    • A. 

      63

    • B. 

      -1

    • C. 

      0

    • D. 

      1

    • E. 

      -11

  • 29. 
    Public class test{ public static void main(string args[]){ int x=0,y=1,z; if(x) z=0; else z=1; if(y) z=2; else z=3; system.out.println(z); } }
    • A. 

      The program prints 0

    • B. 

      The program prints 1

    • C. 

      The program prints 2

    • D. 

      A program does not compile bcz of problems in the if statement

  • 30. 
    Which of the following doen n't lead to run time errors
    • A. 

      Dividing by zero

    • B. 

      Square root of a negative number

    • C. 

      Logarithm of zero

    • D. 

      Exceeding the system dependent limits

  • 31. 
    What type of error does following statement leads to : d=a+(b+c))+3; where a,b,c,d are all declared as int
    • A. 

      Run-time error

    • B. 

      Syntax error

    • C. 

      Logical error

    • D. 

      Grammatical error

  • 32. 
    The  process of detecting & correcting the errors in the program is called as
    • A. 

      Correction

    • B. 

      Verification

    • C. 

      Debugging

    • D. 

      Error detection

  • 33. 
    If you declare an array of 100 elements , the elements have index
    • A. 

      0 through 99

    • B. 

      0 through 100

    • C. 

      1 through 99

    • D. 

      1 through 100

  • 34. 
    Consider the following two c statements int a[10]; int *p1,*p2; p1=a; p2=&a[0];
    • A. 

      Both p1 and p2 hold the address of a[0]

    • B. 

      P1 holds the address of a[0] and p2 holds the value of a[0]

    • C. 

      P2 holds the address of a[0] and p1 holds the value of a[0]

    • D. 

      Both p1 and p2 hold the value of a[0]

  • 35. 
    Algorithms written in english like language are called
    • A. 

      Pseudo code

    • B. 

      Source code

    • C. 

      Program code

    • D. 

      Physical code

  • 36. 
    Which property of the algorithm states that each step should be primitive and can be performed exactly in a finite amount of time
    • A. 

      Finiteness

    • B. 

      Effectiveness

    • C. 

      Definiteness

    • D. 

      Generally

  • 37. 
    Which of these not an advantage of flow charts
    • A. 

      Logic of program can be easy understood

    • B. 

      Following the flow chart logically is simple

    • C. 

      Translation of flow chart into computer program is always easy

    • D. 

      All of the above

  • 38. 
    The text of a program that a user can read, is commonly through of as a
    • A. 

      Source code

    • B. 

      Object code

    • C. 

      Machine code

    • D. 

      Pseudo code

  • 39. 
    Which type of languages allows procedures and functions to be declared with in other procedures and functions
    • A. 

      Object-oriented

    • B. 

      Procedural

    • C. 

      Block-structured

    • D. 

      None of the above

  • 40. 
    C is also called as ........................ programming language
    • A. 

      Low level

    • B. 

      High level

    • C. 

      Middle level

    • D. 

      None of the above

  • 41. 
    Which among these not a binary operator
    • A. 

      &&

    • B. 

      &

    • C. 

      |

    • D. 

      !

  • 42. 
    Where are the global variables stored in memory
    • A. 

      Stack

    • B. 

      Heap

    • C. 

      Fixed region of memory set a side for them by the compiler

    • D. 

      Queues

  • 43. 
    Which of the following is valid regarding the type qualifiers
    • A. 

      Const int a;

    • B. 

      Int const a;

    • C. 

      Int a const;

    • D. 

      None of the above

  • 44. 
    The this reference is used in conjunction with.................methods
    • A. 

      Static

    • B. 

      Non-static

    • C. 

      Dynamic

    • D. 

      Non-dynamic

  • 45. 
    One can call super() at any point in a constructor
    • A. 

      Yes

    • B. 

      No

  • 46. 
    How many classes can a class have immediately below in an inheritance hierarchy ?
    • A. 

      0

    • B. 

      1

    • C. 

      2

    • D. 

      Many

  • 47. 
    How many classes can a class have immediately above in an inheritance hierarchy ?
    • A. 

      0

    • B. 

      1

    • C. 

      2

    • D. 

      Many

  • 48. 
    Relational algebra is also called as................................
    • A. 

      Procedural language

    • B. 

      Non-procedural language

    • C. 

      Language procedural

    • D. 

      None of the above

  • 49. 
    Database applications are
    • A. 

      Banking

    • B. 

      Telecommunications

    • C. 

      Credit card transactions

    • D. 

      All of the above