3i Infotech Papers: Sample Questions 624 - 625 of 1245

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

Question number: 624

» Languages » C & C Plus Plus

MCQ▾

Question

What is output for the following program.

  1. #include
  2. main ()
  3. {
  4.     int a[5], i, * ip;
  5.     for (i = 0i<5i + + )
  6.     a[i] = i;
  7.     ip = a;
  8.     printf ( “%d” * (ip + 3 * sizeof (int) ) );
  9. }

Choices

Choice (4) Response

a.

0

b.

5

c.

1

d.

None of the above

Answer

d.

Explanation

Table showing the program

Table showing the program

#include < tdio. h >

Standard library function

main ()

startup after initialization

int a [5], i, *ip;

Declare integer array of 5, integer i and * ip is pointer to an integer

for (i = 0; i < 5; i++)

In for loop increase value of i

a [i] = i;

ip = a;

Array element i is equal to i and ip = a, that is the beginning of the array. Array name is the pointer to first element in the array

printf (“%d” * (ip + 3 * sizeof (int) ) );

This would print 3rd value in the array a [] which is 3.

Question number: 625

» Database » Oracle

MCQ▾

Question

Is it possible to Enable or Disable a database trigger?

Choices

Choice (4) Response

a.

Yes

b.

No

c.

All of the above

d.

None of the above

Answer

a.

Explanation

  • Database triggers are procedures it is stored in the database and activated when specific conditions occur, like adding a row to a table.

  • Supplement the standard capabilities of the database for highly customized database management system.

    Triggers have two distinct modes:

  • Enabled

    • An enabled trigger executes its trigger body if a triggering statement is issued and the trigger restriction.

  • Disabled

    • A disabled trigger does not execute its trigger body and the trigger restriction evaluates to true.

Image of the two distinct modes

Image of the Two Distinct Modes

Image of the two distinct modes

Enabling Trigger:

  • If we have disabled a trigger on a table and we enable the trigger again.

  • We can do this with the ALTER TRIGGER statement.

    Syntax:

  • ALTER TRIGGER trigger_name ENABLE;

    trigger_name

  • The name of the trigger that is enable.

    Eg

  • ALTER TRIGGER order_before_insert ENABLE;

Disable trigger:

  • Created a Trigger in oracle, we might find that we are required to disable the trigger.

  • we can do this with the ALTER TRIGGER statement.

Syntax

  • ALTER TRIGGER trigger_name DISABLE;

    trigger_name

  • The name of the trigger to disable.

    Ex.

  • ALTER TRIGGER order_before_insert DISABLE;