Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged strings
0
0 votes
0
0 answers
46
46 views
CMI 2026 | CS | Part A | Question: 7
A binary string $s$ of length $2026$ starts with bit $\color{red}{0}$ and ends with bit $\color{red}1$. Let $N_{00}, N_{01}, N_{10}$, and $N_{11}$ denote the number of ti...
Shubham Sharma 2
46
views
asked
Aug 23
Theory of Computation
cmi2026
binary-string
counting
combinatorics
strings
+
–
0
0 votes
0
0 answers
39
39 views
CMI 2026 | CS | Part B | Question: 1b
You are given a long sheet of (ruled) paper with the string $\mathrm{MI}$ written on the first line. You are asked to fill in lines $2,3,4, \ldots$ (in order) with other ...
Shubham Sharma 2
39
views
asked
Aug 23
Theory of Computation
cmi2026
theory-of-computation
grammar
derivation
strings
+
–
0
0 votes
0
0 answers
37
37 views
CMI 2026 | CS | Part B | Question: 2a
For a set $X, X^{*}$ denotes the set of all strings formed using $X$, including the empty string. By $x y$, we mean the concatenation of $x$ and $y$, i.e., the string $x$...
Shubham Sharma 2
37
views
asked
Aug 23
Theory of Computation
cmi2026
regular-language
homomorphism
prefix-free-property
strings
combinatorics
+
–
0
0 votes
0
0 answers
42
42 views
CMI 2026 | CS | Part C | Question: 1a
Consider a finite alphabet $\Sigma=\{0,1\}$. For a string $w \in \Sigma^{*}$, we write $|w|$ for the length of $w$. For $u, v \in \Sigma^{*}$, we write $u \cdot v$ for th...
Shubham Sharma 2
42
views
asked
Aug 23
Theory of Computation
cmi2026
theory-of-computation
finite-automata
strings
+
–
9
9 votes
2
2 answers
362
362 views
GO Classes DPP | GATE CS | C Programming | Shifted Pointer in Function
What is the output of the following code?#include <stdio.h void fun(int *p) { *p = *p + 1; p++; *p = *p + 2; } int main() { int arr[] = {5, 10, 15}; fun(arr + 1); printf(...
GO Classes
362
views
asked
Jun 24
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-306
programming-in-c
c-programming
goclasses-c-programming-practice-questions
strings
+
–
9
9 votes
2
2 answers
349
349 views
GO Classes DPP | GATE CS | C Programming | Array Passed to Function
What is the output of the following code?#include <stdio.h void update(int a[]) { a[0] = a[0] + a ; *(a + 1) = *(a + 1) + 5; } int main() { int arr[] = {2, 4, 6}; update(...
GO Classes
349
views
asked
Jun 24
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-306
programming-in-c
c-programming
goclasses-c-programming-practice-questions
strings
+
–
9
9 votes
2
2 answers
364
364 views
GO Classes DPP | GATE CS | C Programming | String Passed to Function
What is the output of the following code?#include <stdio.h void change(char *p) { p = 'X'; *(p + 3) = '\0'; } int main() { char str[] = "GATE"; change(str); printf("%s",...
GO Classes
364
views
asked
Jun 24
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-306
programming-in-c
c-programming
goclasses-c-programming-practice-questions
strings
+
–
7
7 votes
2
2 answers
344
344 views
GO Classes DPP | GATE CS | C Programming | String Pointer Movement
What is the output of the following code?#include <stdio.h int main() { char str[] = "HELLO"; char *p = str + 1; *(p + 2) = 'A'; printf("%s %c", str, *p); return 0; }$\te...
GO Classes
344
views
asked
Jun 24
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-306
programming-in-c
c-programming
goclasses-c-programming-practice-questions
strings
+
–
6
6 votes
2
2 answers
357
357 views
GO Classes DPP | GATE CS | C Programming | Null Character in String
What is the output of the following code?#include <stdio.h int main() { char str[] = {'C', 'S', 'E', '\0', 'X'}; printf("%s %c", str, str[4]); return 0; }$\texttt{CSE X}$...
GO Classes
357
views
asked
Jun 24
Programming in C
goclasses
goclasses-cs-dpp
goclasses-cs-dpp-day-306
programming-in-c
c-programming
goclasses-c-programming-practice-questions
strings
+
–
2
2 votes
1
1 answer
146
146 views
GO Classes DPP | GATE DA | Python Programming | Left Right Strip
Consider the following Python code:a = " #GATE #" b = " *DA *" print(a.lstrip("#"), a.rstrip("#"), b.lstrip("*").rstrip("*"))What is the output of the code above? #GATE G...
GO Classes
146
views
asked
Jun 13
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-199
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
3
3 votes
2
2 answers
146
146 views
GO Classes DPP | GATE DA | Python Programming | Split Method
Consider the following Python code:s = "GO Classes for GATE DA" parts = s.split() print(parts , parts[-2] + parts[-1], len(parts))What is the output of the code above?GO ...
GO Classes
146
views
asked
Jun 13
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-199
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
1
1 vote
1
1 answer
124
124 views
GO Classes DPP | GATE DA | Python Programming | Negative Step
Consider the following Python code:s = "abcdefg" part1 = s[5:1:-2] part2 = s[::-3] print(part1, part2)What is the output of the code above?fdb gdafd gdafd gadeg gda
GO Classes
124
views
asked
Jun 13
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-199
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
2
2 votes
1
1 answer
130
130 views
GO Classes DPP | GATE DA | Python Programming | Slice Defaults
Consider the following Python code:s = "GOClasses" a = s[:2] b = s[2:] c = s[:0] d = s[5:] print(a + b, c == "", d)What is the output of the code above?GO True ClassesGOC...
GO Classes
130
views
asked
Jun 13
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-199
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
2
2 votes
1
1 answer
140
140 views
GO Classes DPP | GATE DA | Python Programming | Empty Slice
Consider the following Python code:s = "HelloWorld" a = s[6:2] b = s[3:3] print(a == b, len(a + b))What is the output of the code above?True 0False 0True 2IndexError
GO Classes
140
views
asked
Jun 13
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-199
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
4
4 votes
1
1 answer
155
155 views
GO Classes DPP | GATE DA | Python Programming | String Length
Consider the following Python code:s = "GOClasses" first = s[0] last = s[len(s) - 1] middle = s[len(s) // 2] print(first + middle + last)What is the output of the code ab...
GO Classes
155
views
asked
Jun 12
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-198
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
1
1 vote
1
1 answer
139
139 views
GO Classes DPP | GATE DA | Python Programming | String Comparison
Consider the following Python code:print("Gate" < "gate", "DA" < "Data", "abc" "ab")What is the output of the code above?True True TrueFalse True TrueTrue False TrueTrue...
GO Classes
139
views
asked
Jun 12
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-198
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
1
1 vote
1
1 answer
135
135 views
GO Classes DPP | GATE DA | Python Programming | Find Method
Consider the following Python code:text = "banana bandana" a = text.find("ana") b = text.find("ana", a + 1) c = text.find("xyz") print(a, b, c)What is the output of the c...
GO Classes
135
views
asked
Jun 12
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-198
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
2
2 votes
1
1 answer
118
118 views
GO Classes DPP | GATE DA | Python Programming | Strip Method
Consider the following Python code:a = " GATE DA " b = " *Data *" print(a.strip() + "-" + b.strip("*").lower())What is the output of the code above?GATE DA-dataGATE DA -d...
GO Classes
118
views
asked
Jun 12
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-198
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
1
1 vote
2
2 answers
153
153 views
GO Classes DPP | GATE DA | Python Programming | String Methods
Consider the following Python code:s = "GATE Data" result = s.lower().replace("gate", "GO").capitalize() print(result)What is the output of the code above?GO dataGo datag...
GO Classes
153
views
asked
Jun 12
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-198
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
3
3 votes
1
1 answer
144
144 views
GO Classes DPP | GATE DA | Python Programming | String Immutability
Consider the following Python code:s = "python" t = s s = s[:2] + "X" + s[3:] print(s, t)What is the output of the code above?pyXhon pythonpyXhon pyXhonpython pythonTypeE...
GO Classes
144
views
asked
Jun 11
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-197
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
4
4 votes
1
1 answer
125
125 views
GO Classes DPP | GATE DA | Python Programming | String Membership
Consider the following Python code:s1 = "Data" s2 = s1 + "base" pattern = "ta" + ("b" * 1) + "ase" tag = s1 + "!" * 2 print(s1 in s2, pattern in s2, "data" in s2, tag)Wha...
GO Classes
125
views
asked
Jun 11
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-197
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
3
3 votes
1
1 answer
118
118 views
GO Classes DPP | GATE DA | Python Programming | Negative Slicing
Consider the following Python code:s = "PythonDPP" print(s[-2:-8:-2])What is the output of the code above?PnhPDtPPDnohty
GO Classes
118
views
asked
Jun 11
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-197
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
3
3 votes
1
1 answer
125
125 views
GO Classes DPP | GATE DA | Python Programming | String Slicing
Consider the following Python code:s = "GATE2027" part1 = s[1:7:2] part2 = s[:4] print(part1 + part2)What is the output of the code above?AE0GATEAT2GATEAE2GATEATE202
GO Classes
125
views
asked
Jun 11
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-197
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
3
3 votes
1
1 answer
127
127 views
GO Classes DPP | GATE DA | Python Programming | String Indexing
Consider the following Python code:s = "GOClassesforGateDA" result = s + s[-3] + s[len(s) - 1] print(result)What is the output of the code above?CeACDAOeACss
GO Classes
127
views
asked
Jun 11
Programming in Python
goclasses
goclasses-da-dpp
goclasses-da-dpp-day-197
programming-in-python
goclasses-python-&-dsa-practice-questions
strings
output
+
–
0
0 votes
2
2 answers
293
293 views
UGC NET CSE | December 2023 | Part 2 | Question: 2
Which of the following is not a palindromic subsequence of the string "$\text{ababcdabba}$"?$\text{abcba}$$\text{abba}$$\text{abbbba}$$\text{adba}$
Shubham Sharma 2
293
views
asked
Sep 9, 2025
Algorithms
ugcnetcse-dec2023
strings
regular-language
data-structures
+
–
36
36 votes
8
8 answers
14.5k
14.5k views
GATE CSE 2025 | Set 2 | Question: 9
Consider the following C program:#include <stdio.h void stringcopy (char *, char *); int main() { char a[30] = "@#Hello World!"; stringcopy(a, a+2); printf("%s\n",a)...
Arjun
14.5k
views
asked
Feb 27, 2025
Programming in C
gatecse2025-set2
programming-in-c
strings
output
one-mark
+
–
2
2 votes
2
2 answers
938
938 views
ISRO CSE 2023 | Question: 73
From a character string of length m , the number of sub-strings of all lengths that can be formed are:$\mathrm{m}^{2}$$\mathrm{m}$$\mathrm{m}(\mathrm{m}+1) / 2$$\mathrm{m...
admin
938
views
asked
Sep 28, 2024
Theory of Computation
isro-cse-2023
counting
strings
+
–
Page:
1
2
3
next »