Change set

Pick exam & year, then Go.

Question map
Not attempted Correct Incorrect Bookmarked
Loading…
Q134 (CISF/2020) Science & Technology › ICT, AI, Cybersecurity & Emerging Tech

In case of ASCII representation of characters, in which order will a computer sort the strings 23, A1, 1A, a2, 2a, aA and Aa ?

Explanation

In ASCII (American Standard Code for Information Interchange), characters are assigned specific numerical values. Computers sort strings lexicographically (character by character) based on these values:

  • Digits (0-9): ASCII 48 to 57
  • Uppercase letters (A-Z): ASCII 65 to 90
  • Lowercase letters (a-z): ASCII 97 to 122

Comparing the first characters: '1' (49) < '2' (50) < 'A' (65) < 'a' (97). This places 1A first. For strings starting with '2', 23 ('3' is 51) comes before 2a ('a' is 97). For strings starting with 'A', A1 ('1' is 49) comes before Aa ('a' is 97). For strings starting with 'a', a2 ('2' is 50) comes before aA ('A' is 65). Thus, the correct order is 1A < 23 < 2a < A1 < Aa < a2 < aA.

✓ Thank you! We'll review this.

SIMILAR QUESTIONS

CAPF · 2014 · Q70 Relevance score: -6.68

Which one among the following is indicated by the following, figure ?

CISF · 2019 · Q150 Relevance score: -6.77

For the use of Indian scripts for data entry, which encoding scheme is used on most of modern computer systems and smart phones?

CDS-II · 2025 · Q83 Relevance score: -7.33

Assuming the computer is a 4-bit computer, what result is produced after subtraction of 3 from 5 using the 2's complement representation ?

NDA-I · 2026 · Q72 Relevance score: -7.98

Three wires each of length L, cross-sectional area A and resistivity p are connected as shown in the figure. These are to be replaced by another wire of same resistivity such that the resistance between points X and Z does not change. If L1 is the length and A1 is the cross-sectional area of the new wire, then which one among the following is correct?

IAS · 1999 · Q131 Relevance score: -8.47

In the sequence of numbers 5, 8, 13, X, 34, 55, 89,.......... the value of ‘X’ is