3i Infotech Papers: Sample Questions 648 - 650 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 648

» Basic CS » Data Structures

Short Answer Question▾

Write in Short

Whether Linked List is linear or Non-linear data structure?

Explanation

  • According to access- listed list is a linear data structure.

  • According to storage linked list is a non-linear data structure as each node can be stored independently.

Linear data structure:

  • Traverses the data elements sequentially, in which only one data element can directly be reached, Eg: Arrays, Linked Lists

Non-Linear data structure:

  • Every data item is attached to several other data items that is specific for reflecting relationships.

  • The data items are not arranged in a sequential structure for example, Trees, Graphs

Question number: 649

» Database » MySQL

Short Answer Question▾

Write in Short

What is Query evaluation engine?

Explanation

  • It executes low-level instruction generated by compiler.

  • Alternative ways of evaluating a query

    • Equivalent expressions

    • Different algorithms for each operation

Image of alternative way of evaluating a given query.

Image of Alternative Way of Evaluating a Given Query.

Image of alternative way of evaluating a given query.

Question number: 650

» Languages » C & C Plus Plus

Short Answer Question▾

Write in Short

What is the output of the following program?

  1. void main ()
  2. {
  3.     static int i = 5;
  4.     if (--i)
  5.     {
  6.         main ();
  7.         printf ( “%d” i);
  8.     }
  9. }

Explanation

In the program

Table shows the program

Table shows the program

static int i = 5;

The variable “i” is declared as static, hence memory for i will be allocated for only once, when it encounters the statement.

if (–i)

{

main ();

printf (“%d” i);

}

The function main () will be called recursively unless i becomes equal to 0, and since main () is recursively called, so the value of static i i.e.. , 0 will be printed every time the control is returned.