Technical Exam 2

27 Questions

Settings
Please wait...
Technical Quizzes & Trivia

Questions and Answers
  • 1. 
    Your Java source code is what directly runs on the Android device
    • A. 

      True

    • B. 

      False

  • 2. 
    How many nodes in a tree have no ancestors?
    • A. 

      0

    • B. 

      1

    • C. 

      2

    • D. 

      3

  • 3. 
    What is the data structure used to perform recursion?
    • A. 

      List

    • B. 

      Linked List

    • C. 

      Stack

    • D. 

      None of the Above.

  • 4. 
    In Worklight project hierarchy, what is the purpose of the "common" folder?
    • A. 

      To contain all resources common between all Worklight environments

    • B. 

      To have all code files common between different Worklight applications

    • C. 

      To have all code files common between different Worklight projects

    • D. 

      TO contain all resources common between different Worklight applications

  • 5. 
    • A. 

      Is_empty

    • B. 

      Pop

    • C. 

      Push

    • D. 

      Two or more of the above answers

  • 6. 
    Which design pattern you would you use to limit the class instantiation to one object?
    • A. 

      Factory Method Design Pattern

    • B. 

      Builder design pattern

    • C. 

      Prototype design pattern

    • D. 

      Singleton design pattern

  • 7. 
    Which of the following will be the postfix expression for the given infix expression:  ((C+(D*E))-F)?
    • A. 

      CDE*+F-

    • B. 

      CDE+*F-

    • C. 

      CDF*+E-

    • D. 

      DCF*+E-

  • 8. 
    The number of interchanges required to sort 5, 1, 6, 2 ,4 in ascending order using Bubble Sort is ....
    • A. 

      6

    • B. 

      5

    • C. 

      7

    • D. 

      8

  • 9. 
    How to left align the content inside table cell? Note: Consider each answer between <>
    • A. 

      Td align=”left”

    • B. 

      Td valign=”left”

    • C. 

      Cell valign=”left”

    • D. 

      Td content-align=”left”

  • 10. 
    In Android, the R file is a(an) ………..  generated file
    • A. 

      Automatically

    • B. 

      Manually

    • C. 

      Emulated

    • D. 

      None of the above

  • 11. 
    If a queue is represented in memory by using a linked list, then what will be the stack empty condition?
    • A. 

      FRONT=0

    • B. 

      FRONT=-1

    • C. 

      FRONT=REAR

    • D. 

      FRONT=NULL

  • 12. 
    In Android, what is contained within the manifest xml file?
    • A. 

      The permissions the app requires

    • B. 

      The list of strings used in the app

    • C. 

      The source code

    • D. 

      All other choices

  • 13. 
    How can you create an e-mail link? Note: consider each answer between <>
  • 14. 
    Consider the algorithm to insert a node at the beginning of the link list and identify the error: 1. Assign value to the data field of the new node 2. Allocate memory for the new node 3. Make the next field of the new node point to the first node in the list. 4. Make START point to the new node
    • A. 

      There is no error

    • B. 

      Step 3 to be changed as, Make the next field of the new node point to NULL

    • C. 

      The sequence is wrong, the correct sequence is 2->1->3->4

    • D. 

      Step 4 to be changed as, Make the new node point to START

  • 15. 
    Which feature of IBM Worklight can be used to retrieve data from external sources?
    • A. 

      Direct server updates

    • B. 

      Rich page editor

    • C. 

      JSON Store

    • D. 

      Adapters

  • 16. 
    Which Data Structure we should use for an application of “Syntax Analysis”?
    • A. 

      Queue

    • B. 

      Tree

    • C. 

      All the above

    • D. 

      None of the above

  • 17. 
    What types of models are created during software requirements analysis?
    • A. 

      Functional and behavioral

    • B. 

      Algorithmic and data structure

    • C. 

      Architectural and structural

    • D. 

      Usability and reliability

  • 18. 
    In Android, what is contained within the Layout xml file?
    • A. 

      Orientations and layouts that specify what the display looks like

    • B. 

      The permissions required by the app

    • C. 

      The strings used in the app

    • D. 

      The code which is compiled to run the app

  • 19. 
    If I want to have my links change color when my mouse hovers over them, I would code the following:
    • A. 

      A:hover{ color: orange;}

    • B. 

      Hover:link {color: orange;}

    • C. 

      A { color: orange;}

    • D. 

      Hover {color: orange;}

  • 20. 
    Merging 4 sorted files containing 50, 10, 25 and 15 records will take time
    • A. 

      O (100)

    • B. 

      O (200)

    • C. 

      O (175)

    • D. 

      O (125)

  • 21. 
    Suppose you have the following list of numbers to sort: [11, 7, 12, 14, 19, 1, 6, 18, 8, 20] which list represents the partially sorted list after three complete passes of selection sort?
    • A. 

      [7, 11, 12, 1, 6, 14, 8, 18, 19, 20]

    • B. 

      [7, 11, 12, 14, 19, 1, 6, 18, 8, 20]

    • C. 

      [11, 7, 12, 13, 1, 6, 8, 18, 19, 20]

    • D. 

      [11, 7, 12, 14, 8, 1, 6, 18, 19, 20]

  • 22. 
    1.      What will be the output of the program?   public class Foo {      public static void main(String[] args)     {         try         {             return;         }         finally         {             System.out.println( "Finally" );         }     } }
    • A. 

      Finally

    • B. 

      Compilation fails

    • C. 

      The code runs with no output

    • D. 

      An exception is thrown at runtime

  • 23. 
    ________ method is used to remove focus from the specified object.
    • A. 

      Blur()

    • B. 

      Focus()

    • C. 

      UnFocus()

    • D. 

      None

  • 24. 
    Which design pattern is used in the Java InputStream, OutputStream, Reader, Writer hierarchies?
    • A. 

      Adapter design pattern

    • B. 

      Decorator design pattern

    • C. 

      Composite design pattern

    • D. 

      Bridge design pattern

  • 25. 
    Given a class named Book, which of the following is not a valid constructor?
    • A. 

      Book ( ) { }

    • B. 

      Book ( Book b) { }

    • C. 

      Book ( Book &b) { }

    • D. 

      Book (char* author, char* title) { }

  • 26. 
    1.      Given:   class PassS {     public static void main(String [] args)     {         PassS p = new PassS();         p.start();     }       void start()     {         String s1 = "slip";         String s2 = fix(s1);         System.out.println(s1 + " " + s2);     }       String fix(String s1)     {         s1 = s1 + "stream";         System.out.print(s1 + " ");         return "stream";     } }   What will be the output of the program?
    • A. 

      Slip stream

    • B. 

      Slipstream stream

    • C. 

      Stream slip stream

    • D. 

      Slipstream slip stream

  • 27. 
    It is known as Action or Transaction and is used to encapsulate a request as an object to support rollback,logging, or transaction functionality
    • A. 

      Chain of Responsibility Pattern

    • B. 

      Command Pattern

    • C. 

      Observer Pattern

    • D. 

      Strategy Pattern