Question:

The following data fragment occurs in the middle of the data stream for which the byte stuffing algorithm is used: A B ESC C ESC FLAG ESC FLAG D. What is the output after stuffing?

Show Hint

Byte stuffing is used to ensure that control characters like FLAG and ESC within data do not conflict with actual control sequences. It adds an extra ESC character before these special bytes.
Updated On: Dec 29, 2024
  • A B ESC ESC C ESC ESC FLAG ESC ESC FLAG D
  • A B ESC C ESC ESC FLAG ESC FLAG ESC D
  • A B ESC ESC C ESC ESC FLAG ESC FLAG D
  • A B ESC ESC C ESC FLAG ESC ESC FLAG D
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Byte stuffing involves adding an ESC byte before every occurrence of a FLAG or an ESC byte to distinguish it from control characters. Final Output After Stuffing: A B ESC ESC C ESC ESC FLAG ESC ESC FLAG D.
Was this answer helpful?
0
0

Questions Asked in CUET PG exam

View More Questions