3i Infotech Placement: Sample Questions 931 - 933 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 931

Edit

Write in Short

Short Answer▾

What is meant by static query and dynamic query?

Explanation

Static Query

  • A result that never changes.
  • Based on information that matched the criteria from the moment when the query was done.

Dynamic Query

Updated with criteria each time it is run.

Question 932

Edit

Describe in Detail

Essay▾

What is the output of the following program?

  1. #include<stdio.h>
  2. main ()
  3. {
  4.     constinti =4;
  5.     floatj;
  6.     j =+ +i;
  7.     printf ( “%d %f” i, ++ j);
  8. }

Explanation

Compiler error

  • In the program
Table Shows the Program
const int i = 4;Given the constant integer i = 4
float j;Given Floating variable j
j =+ + i;
  • Here change the value if I but I is a constant
  • Cannot change the value of constant
  • So the answer is compiler error.

Question 933

Edit

Describe in Detail

Essay▾

What are proxy objects?

Explanation

  • Objects that stand for other objects are called proxy objects or surrogates. Example: template class Array2D {public: class Array1D {public: T& operator [] (int index) ; const T& operator [] (int index) const; …} ; Array1D operator [] (int index) ; const Array1D operator [] (int index) const; …} ; The following then becomes legal: Array2Ddata (10,20) ; …
  • Here data [3] yields an Array1D object and the operator [] invocation on that object yields the float in position (3,6) of the original two dimensional array.
  • Clients of the Array2D class need not be aware of the presence of the Array1D class.
  • Objects of this latter class stand for one-dimensional array objects that, conceptually, do not exist for clients of Array2D.
  • Such clients work as if they were using real, live, two-dimensional arrays.
  • Each Array1D object stands for a one-dimensional array absent from a conceptual model used by the clients of Array2D.
  • In the above example, Array1D is a proxy class.
  • Its instances stand for one-dimensional arrays that, conceptually, do not exist.

Developed by: