a datatype that can hold a character of the implementation’s character set.
Questions tagged [chars]
208 questions
-2
votes
2 answers
c Inline assembly char array to short
I can't manage to make this code work. While debugging, I see the right values/addresses are in the registers but, still, when I use the last mov it doesn't work.
I've browsed a ton of posts but didn't manage to find a way to make it work. So,…

Cicciopalla010
- 21
- 6
-2
votes
3 answers
How do you switch two random letters in a string in java?
I'm looking to switch 2 random characters in a string. For example, if I start with "abcdef", I'd like the computer to generate 2 random numbers, and switch 2 characters. So a possible outcome could be "afcdeb".

Harrison Bergman
- 169
- 1
- 12
-2
votes
3 answers
Whats the best charts jQuery plugin to use on my App?
Hi all,
i'm making an application based on jQuery and i need the best charts plugin to show the information to the client.
My app is litteraly like Google AdWords and Google AdSense. I need to show to the costumers the clicks and views per ad or…

cusspvz
- 5,143
- 7
- 30
- 45
-2
votes
5 answers
Given a array with a blank element how do I print all elements except the blank one?
I have a array of chars called votacoes. And when I do:
for (int i = 0; i < nDeputados; i++) {
System.out.println(votacoes[i]);
}
the output is:
S
A
S
S
S
N
A
As you can see you there is a blank char in index 2.
To print everything except…

Claudio Vasconcelos
- 489
- 1
- 4
- 8
-2
votes
5 answers
How to accept user string input then convert to char and print this out?
I am trying to find a way where i can get the user to enter a string e.g. "Hello my name is mr. blobby" then break this down into individual chars and print them out so it prints them out like so:
{'H', 'e', 'l', 'l', 'o', 'm', 'y'}
so far i have…

Obese Octopus
- 101
- 1
- 2
- 11
-2
votes
3 answers
Take a portion of an array in Java
So I have a string of chars which I want to cycle through in a for loop. When I reach a certain char that passes a boolean check, I want to take every item in the list after that point and cut off from there. Like below:
for (int i = 0; i <…

Sam Ofloinn
- 113
- 9
-2
votes
1 answer
Adding and representing chars with asterisk in java
I have this assignment where I need to create a program that reads the user input and reads the sentence and in the end it needs to represent the amount of times each char repeats itself with asterisk.
By this time this is all the code I have for…

Eddie Smith
- 1
- 4
-3
votes
2 answers
I am trying to encode a string by breaking it down to characters c++
I am trying to change "Hello this is The friend" to "Hello 1Yhis is 1Yhe friend"
#include
using namespace std;
int main()
{
string str("Hello this is The friend");
for ( int i = 0 ; i < str.size(); i++)
{
if (str[i]…

CoffeeWaterController
- 3
- 1
- 1
- 6
-3
votes
3 answers
Converting chars to binary in C++
I wrote this and when I launch it, it gives me all the posibilities. I want it to just give me the one that corresponds with my char I've typed in. Can you tell me what's wrong here?
Thanks in advance.
#include
#include
using…

Infiltrait0rN77
- 37
- 1
- 1
- 1
-4
votes
2 answers
How to find if a string contains any objects in an array?
Say if I have the following code
String sum = "(5+5)/2*6";
char[] bodmasChars = {'+','-','*','/','.'.'(',')'};
Is there a way to check whether the string contains any of the elements in my char[]?

BigAl1992
- 67
- 1
- 2
- 11
-4
votes
1 answer
Read specific integers from file with chars into vector (C++)
I used the search function but could not really find what i was searching for.
I have the following problem:
There is a file like this:
370 18 28 1 129 120
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0
370 18 28 1…

Jack
- 11
- 4
-4
votes
4 answers
How do I swap chars of a whole sentence with user input in C++?
I want to take input from user in
char input[200];
Then I want to swap each character of that input according to
a='y'; b='b'; c='j'; d='m'; e='x'; f='f'; g='w'; h='i';
i='v'; j='c'; k='l'; l='u'; m='t'; n='a'; o='k'; p='h';
q='d'; r='p'; s='s';…

Asad Jamal Malik
- 1
- 1
-6
votes
1 answer
How to convert String to char array without spaces in Java?
Hi everybody I writing java code which counts characters. When I convert String using toCharArray I cant use regex to eliminate whitespaces.
System.out.println( "Enter a string:" );
String input = scanner.nextLine();
// tokenize the…

arsen
- 23
- 1
- 3