Questions tagged as 'char'

3
answers

What happens in a conversion from a char to an int?

How does it work when you get a variable and make char-48 to transform into an integer, for example in this code I made, I used a date for example "22/05/1994" stored in a char vector and turned it into day, month and year all in integer...
asked by 01.02.2014 / 22:03
1
answer

Why is it better to use char [] than String for passwords?

Using Swing, the getPassword() method of JPasswordField returns an array of char[] characters instead of returning String as getText() (which by the way is deprecated). Should I not use String to stor...
asked by 04.09.2017 / 19:26
2
answers

How to multiply an "X" character as many times as you want?

Is there a method that multiplies an "X" character as many times as I want? example: I have the "P" character    P x 5="PPPPP" Is there a ready method in .Net?     
asked by 26.02.2016 / 15:42
1
answer

Encrypt a phrase / word by reversing and changing the vowels, by the following vowels

I was given an exercise in which I have to write a program that reads a word in the range [1-20] and encrypts this word using the steps: Reverse the word where you have a vowel, replace with the next vowel And display the word encrypted...
asked by 30.05.2016 / 00:58
1
answer

Fill char array with random words [closed]

I'm trying to develop an algorithm able to get a vector of strings, sort by word size in descending order and place them inside an array of char embedding if possible all words. The idea of everything would be how to create a grid and make the w...
asked by 20.09.2016 / 12:52
3
answers

How to shuffle characters from a String in Java at random?

I am developing a password generator program. Here you can set the percentage of numbers, letters and special characters you want to have in your password, as well as the size of your password. Later I concatenate the numbers, letters and symbol...
asked by 12.11.2015 / 20:43
4
answers

Converting float to char array in C / C ++

Recently I ran a test and there was an issue that asked for a number like 123.456 to be displayed as 321.456 . I thought the best solution would be to convert this to an array of char and then create an algorithm to print pos...
asked by 03.04.2014 / 18:42
2
answers

Sizeof () or strlen ()?

sizeof() or strlen()? What's the difference between using them in char pointers? which is more appropriate?     
asked by 29.07.2016 / 20:23
2
answers

How do I compare a char entry with an interval (0 to 9) without specifying individual conditions?

I'm doing a program that reads a string and I want to ignore the spaces and letters that the user types (but I have to read the letters i and the math symbols + - / * ^). > What I have achieved so far has been to ignore only the spaces. I th...
asked by 10.09.2016 / 16:23
3
answers

Code to invert sequence of non-vowels ending with zero status

I'm implementing the decodificar function, which aims to call auxiliary functions to invert all non-vowel sequences. For example, if the word is "legal monsters", it will continue to "mortsnol segais". void inverterNvs(NO* elemento, NO*...
asked by 04.09.2017 / 18:34