Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged strings
9
9 votes
2
2 answers
269
269 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
269
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
266
266 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
266
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
230
230 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
230
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
204
204 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
204
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
196
196 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
196
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
117
117 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
117
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
113
113 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
113
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
93
93 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
93
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
100
100 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
100
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
105
105 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
105
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
127
127 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
127
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
110
110 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
110
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
98
98 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
98
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
90
90 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
90
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
122
122 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
122
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
113
113 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
113
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
95
95 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
95
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
88
88 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
88
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
97
97 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
97
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
99
99 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
99
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
268
268 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
268
views
asked
Sep 9, 2025
Algorithms
ugcnetcse-dec2023
strings
regular-language
data-structures
+
–
35
35 votes
7
7 answers
14.1k
14.1k 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.1k
views
asked
Feb 27, 2025
Programming in C
gatecse2025-set2
programming-in-c
strings
output
one-mark
+
–
2
2 votes
2
2 answers
888
888 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
888
views
asked
Sep 28, 2024
Theory of Computation
isro-cse-2023
counting
strings
+
–
0
0 votes
1
1 answer
528
528 views
Similar to gate 1994 question of count of substring
Why we should or should not include null string in this count ?
Sree1998
528
views
asked
Sep 17, 2024
Theory of Computation
theory-of-computation
strings
general-topic-doubt
+
–
5
5 votes
1
1 answer
866
866 views
GO Classes Test Series 2024 | Mock GATE | Test 14 | Question: 42
The provided C code is a version of the C string library function strlen(), which calculates the length of a given string.unsigned int mystrlen(char *c) { unsigned in...
GO Classes
866
views
asked
Feb 5, 2024
Programming in C
goclasses2024-mockgate-14
programming
programming-in-c
strings
multiple-selects
two-marks
+
–
0
0 votes
0
0 answers
652
652 views
how many it string of length 10 over the alphabet {a,b,c} have either exactly three a's or exactly four b's
_shreya123
652
views
asked
Nov 18, 2023
Combinatory
combinatory
strings
+
–
Page:
1
2
3
next »