3i Infotech Placement: Sample Questions 448 - 449 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 448

Question

MCQ▾

Tables derived from the ERD

Choices

Choice (4)

a.

May have multi-valued attributes

b.

Are totally normalised

c.

Are always in 1NF

d.

Can be further demoralised

c.

Explanation

1st Normal From example.

 Product ID Color Price 1 Red, green 15 2 Yellow 22 3 Green 17 4 Yellow, blue 10 5 red 25
• This table is not in first normal form because the [color] column can contain multiple values
• For ex. The first row includes value “red” and “green” .
• To bring this table to first normal form, we split the table into two tables.
 Product ID Price 1 15 2 22 3 17 4 10 5 25
 Product ID Color 1 Red 1 Green 2 Yellow 3 Green 4 Yellow 4 Blue 5 red

Question 449

Edit

Write in Short

What is the output of the following program?

1. `void main ()`
2. `{`
3. `    static int i =i ++, j =j ++, k =k ++;`
4. `    printf (i =%d j =%d k =%d, i, j, k);`
5. `}`

Explanation

In the program

 static int i = i ++ , j = j ++ , k = k ++ ; Here given the static integer variable i, j and k.Since static variables are initialized to zero by default.Then the all variables post increment of i, j and k are 1 printf (i =% d j =% d k =% d, i, j, k) ; Printf prints the value of i = 1 , j = 1 and k = 1

Developed by: