{"id":92906,"date":"2025-06-01T11:35:05","date_gmt":"2025-06-01T11:35:05","guid":{"rendered":"https:\/\/exam.pscnotes.com\/mcq\/?p=92906"},"modified":"2025-06-01T11:35:05","modified_gmt":"2025-06-01T11:35:05","slug":"in-case-of-ascii-representation-of-characters-in-which-order-will-a-c","status":"publish","type":"post","link":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/","title":{"rendered":"In case of ASCII representation of characters, in which order will a c"},"content":{"rendered":"<p>In case of ASCII representation of characters, in which order will a computer sort the strings 23, A1, 1A, a2, 2a, aA and Aa ?<\/p>\n<p>[amp_mcq option1=&#8221;1A<23<2a<A1<Aa<a2<aA\" option2=\"A1<Aa<aA<a2<2a<23<1A\" option3=\"23<2a<1A<a2<aA<Aa<A1\" option4=\"1A<aA<Aa<A1<a2<2a<23\" correct=\"option1\"]\n\n\n\n<div class=\"psc-box-pyq-exam-year-detail\">\n<div class=\"pyq-exam\">\n<div class=\"psc-heading\">This question was previously asked in<\/div>\n<div class=\"psc-title line-ellipsis\">UPSC CISF-AC-EXE &#8211; 2020<\/div>\n<\/div>\n<div class=\"pyq-exam-psc-buttons\"><a href=\"\/pyq\/pyq-upsc-cisf-ac-exe-2020.pdf\" target=\"_blank\" class=\"psc-pdf-button\" rel=\"noopener\">Download PDF<\/a><a href=\"\/pyq-upsc-cisf-ac-exe-2020\" target=\"_blank\" class=\"psc-attempt-button\" rel=\"noopener\">Attempt Online<\/a><\/div>\n<\/div>\n<section id=\"pyq-correct-answer\">\nComputers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII:<br \/>\n&#8211; Digits (&#8216;0&#8217;-&#8216;9&#8217;) have values 48-57.<br \/>\n&#8211; Uppercase letters (&#8216;A&#8217;-&#8216;Z&#8217;) have values 65-90.<br \/>\n&#8211; Lowercase letters (&#8216;a&#8217;-&#8216;z&#8217;) have values 97-122.<br \/>\nThus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right.<br \/>\nLet&#8217;s list the strings and their first characters&#8217; ASCII values:<br \/>\n&#8211; 23: &#8216;2&#8217; (50)<br \/>\n&#8211; A1: &#8216;A&#8217; (65)<br \/>\n&#8211; 1A: &#8216;1&#8217; (49)<br \/>\n&#8211; a2: &#8216;a&#8217; (97)<br \/>\n&#8211; 2a: &#8216;2&#8217; (50)<br \/>\n&#8211; aA: &#8216;a&#8217; (97)<br \/>\n&#8211; Aa: &#8216;A&#8217; (65)<br \/>\nBased on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97).<br \/>\nNow compare within groups with the same first character:<br \/>\n&#8211; 23 vs 2a: &#8216;3&#8217; (51) vs &#8216;a&#8217; (97). &#8216;3&#8217; < 'a', so 23 comes before 2a. Order: 23, 2a.\n- A1 vs Aa: '1' (49) vs 'a' (97). '1' < 'a', so A1 comes before Aa. Order: A1, Aa.\n- a2 vs aA: '2' (50) vs 'A' (65). '2' < 'A', so a2 comes before aA. Order: a2, aA.\nCombining the ordered groups based on the first character's order:\n1A (starts with '1')\n23, 2a (start with '2')\nA1, Aa (start with 'A')\na2, aA (start with 'a')\nThe final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A.\n<\/section>\n<section id=\"pyq-key-points\">\n&#8211; ASCII sorting is based on the numerical value of each character.<br \/>\n&#8211; Sorting is lexicographical, comparing characters from left to right.<br \/>\n&#8211; Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.<br \/>\n<\/section>\n<section id=\"pyq-additional-information\">\nDifferent character encodings (like EBCDIC) have different sorting orders. However, ASCII and its extensions are prevalent, especially in contexts like file systems and databases, making this sorting order common.<br \/>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>In case of ASCII representation of characters, in which order will a computer sort the strings 23, A1, 1A, a2, 2a, aA and Aa ? [amp_mcq option1=&#8221;1A<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1089],"tags":[1288,1113],"class_list":["post-92906","post","type-post","status-publish","format-standard","hentry","category-upsc-cisf-ac-exe","tag-1288","tag-information-and-communication-technology","no-featured-image-padding"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.2 (Yoast SEO v23.3) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>In case of ASCII representation of characters, in which order will a c<\/title>\n<meta name=\"description\" content=\"Computers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII: - Digits (&#039;0&#039;-&#039;9&#039;) have values 48-57. - Uppercase letters (&#039;A&#039;-&#039;Z&#039;) have values 65-90. - Lowercase letters (&#039;a&#039;-&#039;z&#039;) have values 97-122. Thus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right. Let&#039;s list the strings and their first characters&#039; ASCII values: - 23: &#039;2&#039; (50) - A1: &#039;A&#039; (65) - 1A: &#039;1&#039; (49) - a2: &#039;a&#039; (97) - 2a: &#039;2&#039; (50) - aA: &#039;a&#039; (97) - Aa: &#039;A&#039; (65) Based on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97). Now compare within groups with the same first character: - 23 vs 2a: &#039;3&#039; (51) vs &#039;a&#039; (97). &#039;3&#039; &lt; &#039;a&#039;, so 23 comes before 2a. Order: 23, 2a. - A1 vs Aa: &#039;1&#039; (49) vs &#039;a&#039; (97). &#039;1&#039; &lt; &#039;a&#039;, so A1 comes before Aa. Order: A1, Aa. - a2 vs aA: &#039;2&#039; (50) vs &#039;A&#039; (65). &#039;2&#039; &lt; &#039;A&#039;, so a2 comes before aA. Order: a2, aA. Combining the ordered groups based on the first character&#039;s order: 1A (starts with &#039;1&#039;) 23, 2a (start with &#039;2&#039;) A1, Aa (start with &#039;A&#039;) a2, aA (start with &#039;a&#039;) The final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A. - ASCII sorting is based on the numerical value of each character. - Sorting is lexicographical, comparing characters from left to right. - Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"In case of ASCII representation of characters, in which order will a c\" \/>\n<meta property=\"og:description\" content=\"Computers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII: - Digits (&#039;0&#039;-&#039;9&#039;) have values 48-57. - Uppercase letters (&#039;A&#039;-&#039;Z&#039;) have values 65-90. - Lowercase letters (&#039;a&#039;-&#039;z&#039;) have values 97-122. Thus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right. Let&#039;s list the strings and their first characters&#039; ASCII values: - 23: &#039;2&#039; (50) - A1: &#039;A&#039; (65) - 1A: &#039;1&#039; (49) - a2: &#039;a&#039; (97) - 2a: &#039;2&#039; (50) - aA: &#039;a&#039; (97) - Aa: &#039;A&#039; (65) Based on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97). Now compare within groups with the same first character: - 23 vs 2a: &#039;3&#039; (51) vs &#039;a&#039; (97). &#039;3&#039; &lt; &#039;a&#039;, so 23 comes before 2a. Order: 23, 2a. - A1 vs Aa: &#039;1&#039; (49) vs &#039;a&#039; (97). &#039;1&#039; &lt; &#039;a&#039;, so A1 comes before Aa. Order: A1, Aa. - a2 vs aA: &#039;2&#039; (50) vs &#039;A&#039; (65). &#039;2&#039; &lt; &#039;A&#039;, so a2 comes before aA. Order: a2, aA. Combining the ordered groups based on the first character&#039;s order: 1A (starts with &#039;1&#039;) 23, 2a (start with &#039;2&#039;) A1, Aa (start with &#039;A&#039;) a2, aA (start with &#039;a&#039;) The final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A. - ASCII sorting is based on the numerical value of each character. - Sorting is lexicographical, comparing characters from left to right. - Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/\" \/>\n<meta property=\"og:site_name\" content=\"MCQ and Quiz for Exams\" \/>\n<meta property=\"article:published_time\" content=\"2025-06-01T11:35:05+00:00\" \/>\n<meta name=\"author\" content=\"rawan239\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rawan239\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"In case of ASCII representation of characters, in which order will a c","description":"Computers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII: - Digits ('0'-'9') have values 48-57. - Uppercase letters ('A'-'Z') have values 65-90. - Lowercase letters ('a'-'z') have values 97-122. Thus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right. Let's list the strings and their first characters' ASCII values: - 23: '2' (50) - A1: 'A' (65) - 1A: '1' (49) - a2: 'a' (97) - 2a: '2' (50) - aA: 'a' (97) - Aa: 'A' (65) Based on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97). Now compare within groups with the same first character: - 23 vs 2a: '3' (51) vs 'a' (97). '3' &lt; &#039;a&#039;, so 23 comes before 2a. Order: 23, 2a. - A1 vs Aa: &#039;1&#039; (49) vs &#039;a&#039; (97). &#039;1&#039; &lt; &#039;a&#039;, so A1 comes before Aa. Order: A1, Aa. - a2 vs aA: &#039;2&#039; (50) vs &#039;A&#039; (65). &#039;2&#039; &lt; &#039;A&#039;, so a2 comes before aA. Order: a2, aA. Combining the ordered groups based on the first character&#039;s order: 1A (starts with &#039;1&#039;) 23, 2a (start with &#039;2&#039;) A1, Aa (start with &#039;A&#039;) a2, aA (start with &#039;a&#039;) The final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A. - ASCII sorting is based on the numerical value of each character. - Sorting is lexicographical, comparing characters from left to right. - Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/","og_locale":"en_US","og_type":"article","og_title":"In case of ASCII representation of characters, in which order will a c","og_description":"Computers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII: - Digits ('0'-'9') have values 48-57. - Uppercase letters ('A'-'Z') have values 65-90. - Lowercase letters ('a'-'z') have values 97-122. Thus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right. Let's list the strings and their first characters' ASCII values: - 23: '2' (50) - A1: 'A' (65) - 1A: '1' (49) - a2: 'a' (97) - 2a: '2' (50) - aA: 'a' (97) - Aa: 'A' (65) Based on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97). Now compare within groups with the same first character: - 23 vs 2a: '3' (51) vs 'a' (97). '3' &lt; &#039;a&#039;, so 23 comes before 2a. Order: 23, 2a. - A1 vs Aa: &#039;1&#039; (49) vs &#039;a&#039; (97). &#039;1&#039; &lt; &#039;a&#039;, so A1 comes before Aa. Order: A1, Aa. - a2 vs aA: &#039;2&#039; (50) vs &#039;A&#039; (65). &#039;2&#039; &lt; &#039;A&#039;, so a2 comes before aA. Order: a2, aA. Combining the ordered groups based on the first character&#039;s order: 1A (starts with &#039;1&#039;) 23, 2a (start with &#039;2&#039;) A1, Aa (start with &#039;A&#039;) a2, aA (start with &#039;a&#039;) The final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A. - ASCII sorting is based on the numerical value of each character. - Sorting is lexicographical, comparing characters from left to right. - Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.","og_url":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/","og_site_name":"MCQ and Quiz for Exams","article_published_time":"2025-06-01T11:35:05+00:00","author":"rawan239","twitter_card":"summary_large_image","twitter_misc":{"Written by":"rawan239"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/","url":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/","name":"In case of ASCII representation of characters, in which order will a c","isPartOf":{"@id":"https:\/\/exam.pscnotes.com\/mcq\/#website"},"datePublished":"2025-06-01T11:35:05+00:00","dateModified":"2025-06-01T11:35:05+00:00","author":{"@id":"https:\/\/exam.pscnotes.com\/mcq\/#\/schema\/person\/5807dafeb27d2ec82344d6cbd6c3d209"},"description":"Computers typically sort strings based on the numerical values assigned to characters in a character encoding standard like ASCII. In ASCII: - Digits ('0'-'9') have values 48-57. - Uppercase letters ('A'-'Z') have values 65-90. - Lowercase letters ('a'-'z') have values 97-122. Thus, digits come before uppercase letters, which come before lowercase letters. Sorting is done character by character from left to right. Let's list the strings and their first characters' ASCII values: - 23: '2' (50) - A1: 'A' (65) - 1A: '1' (49) - a2: 'a' (97) - 2a: '2' (50) - aA: 'a' (97) - Aa: 'A' (65) Based on the first character, the order is 1A (49), then 23 and 2a (both 50), then A1 and Aa (both 65), then a2 and aA (both 97). Now compare within groups with the same first character: - 23 vs 2a: '3' (51) vs 'a' (97). '3' &lt; &#039;a&#039;, so 23 comes before 2a. Order: 23, 2a. - A1 vs Aa: &#039;1&#039; (49) vs &#039;a&#039; (97). &#039;1&#039; &lt; &#039;a&#039;, so A1 comes before Aa. Order: A1, Aa. - a2 vs aA: &#039;2&#039; (50) vs &#039;A&#039; (65). &#039;2&#039; &lt; &#039;A&#039;, so a2 comes before aA. Order: a2, aA. Combining the ordered groups based on the first character&#039;s order: 1A (starts with &#039;1&#039;) 23, 2a (start with &#039;2&#039;) A1, Aa (start with &#039;A&#039;) a2, aA (start with &#039;a&#039;) The final sorted order is 1A, 23, 2a, A1, Aa, a2, aA. This matches option A. - ASCII sorting is based on the numerical value of each character. - Sorting is lexicographical, comparing characters from left to right. - Digit characters have lower ASCII values than uppercase letters, which have lower values than lowercase letters.","breadcrumb":{"@id":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/exam.pscnotes.com\/mcq\/in-case-of-ascii-representation-of-characters-in-which-order-will-a-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/exam.pscnotes.com\/mcq\/"},{"@type":"ListItem","position":2,"name":"UPSC CISF-AC-EXE","item":"https:\/\/exam.pscnotes.com\/mcq\/category\/upsc-cisf-ac-exe\/"},{"@type":"ListItem","position":3,"name":"In case of ASCII representation of characters, in which order will a c"}]},{"@type":"WebSite","@id":"https:\/\/exam.pscnotes.com\/mcq\/#website","url":"https:\/\/exam.pscnotes.com\/mcq\/","name":"MCQ and Quiz for Exams","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exam.pscnotes.com\/mcq\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/exam.pscnotes.com\/mcq\/#\/schema\/person\/5807dafeb27d2ec82344d6cbd6c3d209","name":"rawan239","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/exam.pscnotes.com\/mcq\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/761a7274f9cce048fa5b921221e7934820d74514df93ef195a9d22af0c1c9001?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/761a7274f9cce048fa5b921221e7934820d74514df93ef195a9d22af0c1c9001?s=96&d=mm&r=g","caption":"rawan239"},"sameAs":["https:\/\/exam.pscnotes.com"],"url":"https:\/\/exam.pscnotes.com\/mcq\/author\/rawan239\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/posts\/92906","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/comments?post=92906"}],"version-history":[{"count":0,"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/posts\/92906\/revisions"}],"wp:attachment":[{"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/media?parent=92906"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/categories?post=92906"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exam.pscnotes.com\/mcq\/wp-json\/wp\/v2\/tags?post=92906"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}