3i Infotech Papers: Sample Questions 290 - 291 of 1245

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

Question number: 290

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is the output of the following program?

  1. main ()
  2. {
  3.     int a[ ] = { 1020304050}, j, * p;
  4.     for (j = 0j<5j + + )
  5.     {
  6.         printf (%d, * a);
  7.         a + +;
  8.     }
  9.     p = a;
  10.     for (j = 0j<5j + + )
  11.     {
  12.         printf (%d, * p);
  13.         p + +;
  14.     }
  15. }

Explanation

Compiler error: Lvalue required.

In a program

Table shows the program

Table shows the program

int a [] = {10,20,30,40,50}, j, * p;

Define the integer array a [], j variable and also int pointer p.

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

{

printf (%d, * a);

a ++;

}

Applies the for loop

Error is in line with statement a++.

The operand must be an Lvalue and may be of any of scalar type for the any operator- array name only when subscribed is an Lvalue.

(An lvalue is an object that persists beyond a single expression- an object that has a name. Lvalue includes all variables, including non modifiable (const) variables)

Simply array name is a non-modifiable Lvalue

Define the Lvalue of expression.

Define the Lvalue of Expression.

Define the Lvalue of expression.

Question number: 291

» Database » MySQL

Essay Question▾

Describe in Detail

What do you mean by atomicity and aggregation?

Explanation

Atomicity:

  • In a transaction involving two or more discrete pieces of information, either all of the pieces are committed or none are.

  • Users should not have to worry about the effect of incomplete transactions.

  • Achieved by complex mechanisms such as logging, or operating-system calls.

Aggregation:

  • Data aggregation is any process in which information is gathered and expressed in a summary form, for purposes such as statistical analysis.

  • Relation between two entity is treated as a single entity.

  • For example- The relation between Center and Course, is acting as an entity in relation with Visitor.

Define the relation between center and course

Define the Relation between Center and Course

Define the relation between center and course, is acting as an entity in relation with visitor.