3i Infotech Papers: Sample Questions 471 - 473 of 1245

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

Question number: 471

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is the output of the following program?

  1. #define DIM (arraytypesizeof (array)/sizeof (type)
  2. main ()
  3. {
  4.     int arr[10];
  5.     printf (“The dimension of the array is %d”, DIM (arrint) );
  6. }

Explanation

The dimension of the array is 10

In the program

Table shows the program

Table shows the program

int arr [10];

  • The size of integer array of 10 elements is 10 * sizeof (int).

#define DIM (array, type) sizeof (array) /sizeof (type)

  • The macro expands to size of (arr) /size of (int) = > 10 * size of (int) /size of (int) = > 10

printf (“The dimension of the array is % d”, DIM (arr, int) );

  • Printf prints The dimension of the array as 10.

Question number: 472

» Basic CS » Operating System

Short Answer Question▾

Write in Short

Is Windows NT a full blown object oriented operating system? Give reasons.

Explanation

  • No, window NT is not a full-blown object oriented operating system.

  • Not implemented in OOP language and data structures reside within one executive component and not represented as objects.

  • Does not support object oriented capabilities.

Question number: 473

» Database » Oracle

MCQ▾

Question

Why is it better to use an INTEGRITY CONSTRAINT to validate data in a table than to use a STORED PROCEDURE?

Choices

Choice (4) Response

a.

Because a stored procedure creates more network traffic than a integrity constraint definition

b.

Because an integrity constraint is automatically checked while data is inserted into or updated in a table while a stored procedure has to be specifically invoked

c.

Because the stored procedure occupies more space in the database than a integrity constraint definition

d.

All of the above

Answer

b.

Explanation

  • Automatically checked when a data is inserted or updated in a table while a stored procedure was specifically invoked.

  • To define certain data quality requirements in the database.

Basically 5 types of integrity constrain in oracle

  • Not null

    • A column in a table specified not null.

    • It’s not possible to insert a null in a column.

    • The default is null.

  • Unique key

    • A primary key combines of a unique key and a not null constraint

  • Primary key

    • A primary key combines of a unique key and a not null constraint.

  • Foreign key

    • A foreign key constraint on a column ensures that the value in that column is found in the primary key of another table.

  • Check

    • A check constraint allows stating a minimum requirement for the value in a column.

5 types of integrity constrain in oracle

5 Types of Integrity Constrain in Oracle

5 types of integrity constrain in oracle