3i Infotech Papers: Sample Questions 758 - 759 of 1245

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

Question number: 758

» Database » MySQL

Essay Question▾

Describe in Detail

Why would you set up indexes on database table?


  • Indexes are used to retrieve data from the database.

  • Users are just used to speed up searches/queries, they cannot see the index.

  • Indexes are used to quickly locate data without having to search every row in a database table every time a database table is accessed.

  • Indexes can create using one or more columns of a database table, providing the basis for both random lookups and efficient access of ordered records.

  • A database index allows a query to efficiently retrieve data from a database.

  • Indexes are related to specific tables and consist of one or more keys.

  • Create INDEX syntax:

CREATE INDEX index_name

ON table_name (column1, column2, …. );

Question number: 759

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Predict the output or error (s) for the following:

  1. main ()
  2. {
  3.     int a = 10, * j;
  4.     void * k;
  5.     j = k = &a;
  6.     j + +;
  7.     k + +;
  8.     printf ( “  %u %u”, jk);
  9. }


  • In the program

Table showing the program

Table showing the program

int a = 10, * j;

  • Define the integer variable a = 10 and pointer j

void * k;

  • Define the void pointer k

j = k = &a;

  • Address of a is stored in j and k

j ++;

  • Increment the j value.

k ++;

  • Increment the k value

  • But void pointers are generic and are used only when the type is not known and as an intermediate address storage type.

  • No pointer arithmetic can be done on them and program cannot apply indirection operator (*) on void pointers.