All Questions
358 questions
0
votes
1
answer
71
views
Assembly: calculation of string index
As a beginner to Assembly, I've been practicing disassembling and reverse engineering on Intel x86 assembly in IDA.
The current program I'm trying to figure out validates the user given password by ...
0
votes
4
answers
103
views
How to concat various chunks of string array based on a condition
Lets say i have a string array like this,
string[] array1 = {
"<p>here is a big sentence</p>",
"file1",
"file2",
"<p>this is a big ...
-1
votes
1
answer
56
views
Hangman School Project Code Debugging C++
I'm trying to program a simple hangman game. I'm trying to have the program run until someone guesses the word but only give them 6 strikes. So basically the counter only increments when the person ...
0
votes
3
answers
104
views
Is there a way to prevent my for loop doubling duplicate letters when comparing two strings for identical letters?
I've got an array of strings and a string. Using a for loop, iterating through both the array and the string, I'm hoping to return the letters that are the same in both.
My solution works until there ...
0
votes
2
answers
113
views
Java - Iterate over an odd length String, two consecutive characters at once
I was reading a file(using BufferedReader & FileReader) line by line and needed to get two successive characters & store it in two distinct variables for every iteration of the loop, but the ...
0
votes
2
answers
446
views
I am trying to find a way to act on characters in an array in Python
I am very new to coding and Python. I am trying to change characters in string elements of an array conditional on their adjacency to another character.
These characters are grouped into arrays based ...
-1
votes
1
answer
73
views
Which loop which is best for iterating for strings in java [duplicate]
I always use normal for loop ie.
for(int i=0;i<s.length;i++){}
for iterating through string although its simple way to iterate through string can anyone suggest me other type of looping method ...
0
votes
1
answer
101
views
Counting Letter Occurrence and Printing a Word Integer Array in MIPS
I am currently working on an assignment for an Assembly Language class and have hit a wall with why it is not working properly.
I need to count the occurrence of each alphabetical letter (a-z) into a ...
0
votes
1
answer
63
views
VBA loop through array string element issue
Due to simple loop though Variant array I notice if value code "SALA_1000" it's seems like compiler doesn't see element , so condition Element = prevElement never happen for this value. What ...
1
vote
0
answers
53
views
Why does the overflow of string's buffer result in the weird behavior in C? [duplicate]
I just started learning C programming language and was testing out some control flow, stdio functionalities.
This is my code:
#include <stdio.h>
#include <string.h>
int main(int argc, ...
0
votes
1
answer
45
views
How can I find the same words in an array?
I have a program that needs to count the number of first words in an array finalArr[].
To do this, I separately write the first word to an array distArr[]. Then I compare the elements of the finalArr[]...
2
votes
4
answers
174
views
How do I search a string of text for words that begin with specific letters and then print them?
I have a string of text and I need to check the string for words that begin with the letter A, then print said words to console.
So far, I have converted the string into its individual parts but am ...
-6
votes
1
answer
55
views
Array and String in JavaScript [duplicate]
a = ['RED', 'BLUE', 'GREEN]
output = R B G
E L R
D U E
E E
N
How to achieve this output ?
(I believe we have to use 2D array methods)
I tried 2 nested ...
0
votes
1
answer
49
views
How to Write a 'removeZeros' function that accepts an integer n and returns this integer without zeros in javascript?
This is the code i have so far but the mate academy platform rejects it
function removeZeros(n) {
let nStr = n.toString();
let nStrArr = nStr.split('');
let nStrArrNoZeros = [];
for (var i ...
0
votes
2
answers
655
views
How do I use a loop to pick random characters from an array
So I am working on a password generator and I have an array of possible characters, populated from user choices. I am trying to get random characters from the array the length of the users chosen ...