3i Infotech Papers: Sample Questions 591 - 593 of 1245

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

Question number: 591

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

  1. #include<stdio.h>
  2. #define MAX(x,y) (x)>(y)?(x):(y)
  3. int main()
  4. {
  5.     int i=10;
  6.     int j=5;
  7.     int k=0;
  8.     k=MAX(i,j);
  9.     printf("%d %d %d",i,j,k);
  10. }

Explanation

  • In the program

Table showing the program

Table showing the program

#define MAX (x, y) (x) > (y)? (x): (y)

  • define the MAX () function

  • Find the maximum value of 2 variable values

int i = 10;

  • define the integer variable i as 10

int j = 5;

  • define the integer variable j as 5

int k = 0;

  • define the integer variable k = 0

k = MAX (i, j);

  • Apply the MAX () function and max value store in k

printf (“%d % d %d”, i, j, k);

  • printf prints the value of i = 10, j = 5 and k = 10

Question number: 592

» Database » MySQL

Short Answer Question▾

Write in Short

What is a view? How it is related to data independence?

Explanation

  • A view may be thought of as a virtual table, that is, a table that does not really exist in its own right but is instead derived from one or more underlying base table.

  • In other words, there is no stored file that direct represents the view instead a definition of view is stored in data dictionary.

  • Growth and restructuring of base tables is not reflected in views.

  • Thus the view can insulate users from the effects of restructuring and growth in the database.

  • Hence accounts for logical data independence.

Question number: 593

» Database » MySQL

Short Answer Question▾

Write in Short

What is the parameter substitution symbol used with INSERT INTO command?

Explanation

  • & parameter substitution symbol used with INSERT INTO.

  • INSERT INTO command is not used before a substitution variable.

  • It is used to add new records into a database table with values for all its column.

  • Can be combined with a SELECT to insert records.

Syntax of INSERT INTO command

INSERT INTO table_name (column_name)

VALUE (values)