3i Infotech Placement: Sample Questions 331 - 332 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 331

Edit

Describe in Detail

Essay▾

What is the output of the following program?

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

Explanation

Compiler error: Lvalue required.

In a 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

Question 332

Edit

Describe in Detail

Essay▾

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, is Acting as an Entity in Relation with Visitor

Developed by: