3i Infotech Placement: Sample Questions 8 - 11 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 8

Edit

Write in Short

Short Answer▾

If a binary tree has 20 nodes then it has how many null branches?

Explanation

  • A binary tree with 20 nodes has 21 many null branches.
  • Consider, a tree with 5 nodes (n = 5)
  • No. of null pointer = 2n- (n-1) = n + 1
  • When , n = 20
  • Then n + 1 = 20 + 1 = 21

Question 9

Edit

Describe in Detail

Essay▾

What is System R? What are its two major subsystems?

Explanation

Figure of the System R
  • System R was designed and developed over a period of 1974 - 79 at IBM San Jose Research Center.
  • It is a prototype and its purpose was to demonstrate that it is possible to build a Relational System that can be used in a real life environment to solve real life problems, with performance at least comparable to that of existing system.

    Its two subsystems are

    • Research Storage
    • System Relational Data System.

Question 10

Edit

Write in Short

Short Answer▾

In what way the validity fault handler concludes?

Explanation

  • It sets the valid bit of the page by clearing the modify bit.
  • Maps the page to the memory
  • It recalculates the process priority.

Question 11

Edit

Describe in Detail

Essay▾

Find the output of the following program

  1. classopOverload
  2. {
  3.     public:booloperator==(opOverloadtemp);
  4. };
  5. boolopOverload::operator==(opOverloadtemp)
  6. {
  7.     if(⚹this == temp )
  8.     {
  9.         cout"The both are same objects"; returntrue;
  10.     } else
  11.     {
  12.         cout"The both are different"; returnfalse;
  13.     }
  14. }
  15. voidmain()
  16. {
  17.     opOverloada1, a2; a1==a2;
  18. }

Explanation

  • In the program
Table Showing the Program
  1. classopOverload
  2. {
  3.     public:booloperator==(opOverloadtemp);
  4. };
  • Define the class opOverload
  • Define the Boolean variable operator == (opOverload temp)
  1. boolopOverload::operator==(opOverloadtemp)
  2. {
  3.     if(⚹this == temp )
  4.     {
  5.         cout ≪ “Thebotharesameobjects”; returntrue;
  6.     } else
  7.     {
  8.         cout ≪ “Thebotharedifferent”; returnfalse;
  9.     }
  10. }
  • Here operator functions can be called recursively
  • And check the if condition
  1. voidmain()
  2. {
  3.     opOverloada1, a2; a1==a2;
  4. }
  • This program just illustrates that point; calling the operator == function recursively, leading to an infinite loop.

Developed by: