13
ICAR JRF Bioinformatics 29 Jun 2024Shift 1
MCQ (Single Correct) +4 −1

Consider the Perl program given below: ```perl @bases = ('A', 'G', 'C', 'T'); $base1 = shift @bases; print "@bases"; ``` What will be printed on the screen after running the above code?

1. AGC
2. G C T
3. A
4. GCTA
EXPLANATION Bio-Programming
  • Execution Trace of Perl Array Shift:
  • Initial array declaration:

@bases = ('A', 'G', 'C', 'T');

  • Function call: shift @bases:
  • The Perl built-in shift function removes and returns the first element from an array, shifting all subsequent elements down by one index.
  • `$base1 receives the shifted element 'A'`.
  • The array @bases is modified in-place to contain: ('G', 'C', 'T').
  • Print statement: print "@bases";:
  • In double quotes, Perl interpolates array elements separated by the list separator `$"` (a single space by default).
  • Output printed on screen: G C T.
  • Conclusion: G C T (Option 2).

Correct option: (2) 6CT

Explanation not matching this question? क्या व्याख्या इस प्रश्न से मेल नहीं खा रही? Report
Want to practice this paper in exam conditions? क्या आप परीक्षा जैसे माहौल में अभ्यास करना चाहते हैं? Test yourself in 5-question batch format with timer and hidden answers. 5-प्रश्नों के बैच फॉर्मैट, टाइमर और छिपे उत्तरों के साथ खुद को परखें।
Start Practice Mode → प्रैक्टिस टेस्ट मोड शुरू करें →
Official PYQ Papers

Previous Year Papers of Bioinformatics

Practice official shift-wise question papers with answer keys and detailed explanations on the actual exam pattern.

1
Total Available Previous Papers

Choose Exam

Exam Directory

Browse official Previous papers and mock tests

10 Major Agriculture Exams Available