No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello, I am studying for SCJP 6 Exam, and came across this question which shows code as asks for the output [CODE] 3. public class Ebb { 4. static int x = 7; 5. public static void main(String[] args) { 6. String s = ""; 7. for(int y = 0; … |
|
Hello, I am creating code that seemed fine, except when I entered a single character, or strings instead of numbers, the console continually prompts for user input and it is difficult to terminate the console. Below is the code [CODE] printf("\nHow many computers do you want to update?\n"); scanf("%d", &numComputersToUpdate); … |
|
Hello, I am trying to create a function that compares lower and upper bound IP addresses. If the lower bound IP address is greater than the upper bound IP address I would like the program to 1. display the error 2. terminate immediately Problem is, when I use exit(0) to … |
|
There is a script that I have been tasked to run and modify. However, I am having quite difficulty in understanding the signifigance of return codes, and it would make my life easier if I can redirect the system console output to file. In Windows, I tried going to run, … |
|
Hello, I am using Visual Studio 2008 to program in C++. My program needs to read in a line, break it into two strings. It seems that the String Toolkit Library (StrTk) ([url]http://www.partow.net/programming/strtk/index.html[/url]) will enable this. However, I am unable to figure out how to physically add the library files … |
|
I have created a procedure, exitFailure() that is invoked if a file doesn't exist: [CODE] int exitFailure() {//start exitFailure() printf("Failure, hit any key to exit and press enter.\n"); scanf("%d", &counterx); return 1; }//end exitFailure() [/CODE] Below is the snippit of code that invokes exitFailure() [CODE] inFile.open(inputFilename, ios::in); if (!inFile) { … |
|
I am trying to write a program that 1. opens letterFile containing letters on each line 2. reads in first line of letterFile 3. save the pointer position of letterFile in pos 4. opens numFile containing numbers on each line 5. as it goes through numFile, outputs the letter from … |