Basic CS [3i Infotech Placement]: Sample Questions 29 - 30 of 243

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

Question 29

Question

MCQ▾

When X-Ray photons collide with electrons.

Choices

Choice (4)

a.

They slow down

b.

Their energy decreases

c.

Their mass increases

d.

Their wavelength increases

Answer

d.

Explanation

X-Ray Photons Collide with Electrons
  • X-Ray photons interact and not actually collide, with electrons at atomic level.
  • The figure above depicts the types of interactions involved with high-energy photons and electrons.
  • Due to absorption of energy when X-Ray photons collide with electrons, their wavelength increases (or frequency decreases) .

Question 30

Edit

Describe in Detail

Essay▾

Sort the given values using Quick sort?

65 70 75 80 85 60 55 50 45

Explanation

  • Sorting take place from the pivot value, which is the first value of the given elements.
  • The values at the left pointer and right pointer are indicated using L and R respectively.

    65 70L 75 80 85 60 55 50 45R

  • Pivot is not changed the same process is continued after interchange the values at L and R positions.

    65 45 75L 80 85 60 55 50R 70

    65 45 50 80L 85 60 55R 75 70

    65 45 50 55 85L 60R 80 75 70

    65 45 50 55 60R 85L 80 75 70

  • When the L and R pointers cross each other the pivot value is interchange with the value at right pointer.
  • The pivot element is changing that means the pivot element occupy original position in the sorted order.
  • So, two different arrays are formed, one from start of the original array to the pivot position -1 and the second from position + 1 to end.

    60L 45 50 55R 65 85L 80 75 70R

    55L 45 50R 60 65 70R 80L 75 85

    50L 45R 55 60 65 70 80L 76R 85

  • The next pass we get the sorted from of the array.

45 50 55 60 65 70 75 80 85

Developed by: