No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
10 Posted Topics
Hi, so I'm having a strange problem right now when I'm initializing an array that is a double pointer. The line that is causing me problems is lines->list = malloc(num_elements * sizeof(char *)) Lines is a struct, and list is a double pointer to a character. So char **line All … | |
Hi, I'm having a minor problem with output with printf. I understand you escape % in printf with %% so if I had some string it would be printf("%%eax"); But if I have printf("%%%s", registers(C)); I get an an output of %%eax, which is one too many percent signs. I … | |
Hi, I'm trying to complete this method for a binary search tree and recursion has never been my strong point. All it does is return the total number of nodes in the tree. I have an answer that finds it a different way, but I wanted trying to get it … | |
String q = new String(“Cat”); String r = q; String s = new String(r); I understand that the first line would equate to `String q = "Cat";` and the second would be `String r = q;`, but what would the last one equate to without using new? I originally thought … | |
Hi, I'm having some problems with my program and I'm not sure how to fix them. I have a main method that starts out with a frame. [CODE]public class Cryptography { public static void main(String[] args) { CryptoMainMenu mainMenu = new CryptoMainMenu(); JFrame frame = new JFrame("Cryptography"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(mainMenu); frame.pack(); … | |
Hi, I'm trying to make a menu and when you click on one of the JButtons, it'll go from my first class's GUI to my second class's GUI. But when I run the program, and I press the button algorithm, it changes to a blank screen, and not to the … | |
Hi, I'm having trouble understanding pointers and arrays. [CODE] course[] = "Numerical Methods"; printf("%c %s\n", course[6], course); printf("%c %s\n", course[6], &course[0]); [/CODE] I don't understand how the second print statement prints the same thing as the first. How does &course[0] print out the entire array? I thought it was just … | |
Hi, this is a multiple choice question from my AP CS review book. I can't seem to figure out the right answer even after looking at the answer. Which of the following will evaluate to true only if boolean expression A, B, and C are all false? A) !A && … | |
Hi, this is a multiple choice question from my AP CS review book. I can't seem to figure out the right answer even after looking at the answer. Which of the following will evaluate to true only if boolean expression A, B, and C are all false? A) !A && … | |
I was writing a program and I wasn't sure sure how to do letter b. I have the methods and constructor but I'm not sure how to format the float. 2. Create a class called Item. a. Item will need instance variables itemID, itemName, inStore, and Price (of types String, … |
The End.