string tag

223 questions


1 answers
77 views
0
String truncation using Java substring is not working properly

package assignment2;import java.util.Scanner;import java.util.Arrays;public class assign3 { public static void main(String[] args) { int n; int m; Scanner scan = new Scanner(System.in); System.out...

2 years ago

1 answers
122 views
0
[C language] I'd like to save a string of text files in an array, but I'm curious about the method

I want to save five strings in a text file in a char pointer array.Current code.This is the output screen.

2 years ago

1 answers
73 views
0
[C language] If I enter 5 strings in a text file, is the text file 1 string? Is it five?

Current code.The appearance stored in the text file.When you try to save a string in a text file to a string array How should I give the size of the string out of 1 or 5?

2 years ago

1 answers
42 views
0
What is the difference between string and char[] in c++?

string strTest = Hello; has a size of 5 charTest[] = {'H', 'e', 'l', 'l', 'o'}; has a size of 5.What is the difference between string and char[]?

2 years ago

1 answers
44 views
0
I want to know how to divide only the numbers in the Python string.

I'm coding with Python. Hong Gil-dong 1,200,000 won, Lim Kkeok-jeong 3,000,000 won, and Jang Gil-san 6,000,000 won only the amount that appears in the string divided by half Honggil-dong KRW 600,000, ...

2 years ago

1 answers
39 views
0
c) To print out the number of alphabets in the string

#define _CRT_SECURE_NO_WARNINGS#include <stdio.h>#include <string.h>int main(void){char *src = aaabbb;char* output=a;char eng[26] = { 0 }; char string[10] = { 0 };for (int i = 'a'; i <=...

2 years ago

2 answers
40 views
0
Find the number of Python uppercase, lowercase, and special characters

p0Y123!@#I don't know how to count lowercase, uppercase, number, and special characters in the THon string data.

2 years ago

1 answers
119 views
0
Output using split

When outputting a string with the split function as 1,2,3,4,5 Day = 1This = 23 = 3 G = 4 Oh = 5What should I do if I want to print it out like this

2 years ago

2 answers
130 views
0
I want to include the reference character when sliding the Python string.

If you just slice based on certain characters, those characters don't appear, but only the words are cut off and stored in the list. For exampleHello, world. If you slice it according to ,[Hello, worl...

2 years ago

1 answers
42 views
0
Error trying to put Python strings in the list one by one. TypeError: string indices must be integers, not str

I'm trying to cut strings one by one and put them on the list, but I keep getting errors. I'd appreciate it if you could tell me what the problem is.string = Hello World!list = []for i in string: lis...

2 years ago
« - 21 - »

© 2024 OneMinuteCode. All rights reserved.