Questions tagged [output]

The externally observable consequences of calling a program on some input

The output of a program is the set of externally observable consequences of running a program on the given input.

A program's output can be manifested in several forms:

  1. What is printed to and/or
  2. What is written to an external file
  3. What changes are made to the inputs, which are then used in other functions or programs
9797 questions
2
votes
2 answers

C: Hexadecimal output comes out with "ffff"?

I have the following code: #include #include int main(){ int first = cdab3412; int second = abcd1234; int result1 = (second >> 16) | (first & 0xFFFF0000); int result2 = (first << 16) | (second &…
user2821275
2
votes
3 answers

is System.out.printf() statement asynchronous?

I am printing information to test Threads using Reentrant locks. I am creating fair locks using statement new ReentrantLock(true). In one of the object method where I am using lock, I am using method e.g. method() { for (int n = 0; n < 3; n++)…
Mayur
  • 440
  • 1
  • 5
  • 13
2
votes
3 answers

C - Reading line by line from a file - wrong output displayed

I am trying to read integers from a file one by one, and read it into the program as a row & column number. My file contents are: 3 2 1 2 2 2 3 And my code: fgets(line, 2, fp); livecells = atoi(line); fprintf(stderr, "\n%i live cells\n",…
George Loman
  • 43
  • 1
  • 7
2
votes
0 answers

javascript in terminal cant return output

I want to compile javascript like I would java in the terminal (on a mac) where I can input a file and get the output returned to me. I have managed to create an alias of the javascript compiler located deep in the Systems folder, and have created…
netboi
  • 27
  • 6
2
votes
1 answer

Php output continuous stream

So I've been experimenting with PHP's fOpen function and I've had a lot of success with reading sound files. Now, I'm trying to create a sort of "relay" for shoutcast streams. File_get_contents is probably the poorest way of doing this, since the…
Ion Retroz
  • 21
  • 4
2
votes
2 answers

Matlab output - Space padding?

I'm trying to output a Matrix: M = [1 20 3; 22 3 24; 100 150 2]; Using: for i=1:3 fprintf('%f\t%f\t%f\n', M(i), M(i+length(M)), M(i+length(M)*2)); end And the output is turning out something like: 1 20 3 22 3 24 100 150 2 Which is…
Travv92
  • 791
  • 4
  • 14
  • 27
2
votes
2 answers

Output positions of Matlab figures

I want to show my graphical output of a Matlab program in a different pre-fixed window. So, that whenever I run the program, the output should be inside this figure. I followed a tutorial on the Matlab website and the created the figure as…
MMH
  • 1,676
  • 5
  • 26
  • 43
2
votes
2 answers

output in different windows

Can I show 3-4 outputs(graphical output, Same images) in different windows using matlab.some thing like the following fig. for more clarification- example- for i=1:10 vid = videoinput('winvideo',…
MMH
  • 1,676
  • 5
  • 26
  • 43
2
votes
1 answer

Batch Program Produces Strange Unexpected Output

Before I remembered how to accomplish what I was doing, I tried a couple different things, kind of just hacking at it. What I was trying to accomplish was to set the following string as a variable and then echo it out in a batch script:
dgo
  • 3,877
  • 5
  • 34
  • 47
2
votes
2 answers

Save matlab output in textfile

I have two vectors in matlab with n-entries, let us call them x and y. Now I want to create a textfile that has the following structure: You have two columns(one for the x values and one for the y-values) and then I want to get: x(1) y(1) …
user2649077
2
votes
1 answer

sql result as array of arrays

i'm trying to format the output of a sql query as an array of arrays, for using the gannti class graph tool on my sql data. I'm not very experienced(outside industrial plc's), and can't seem to find a solution to this particular problem despite lots…
2
votes
4 answers

Mapreduce Hadoop job exception Output directory already exists

I'm running a mapreduce job with the following run code and it keeps giving me the following exception. I made sure that I remove the folder before starting the job but it doesn't work. The code: JobConf jobConf = new JobConf( getConf(),…
mettirdas
  • 23
  • 1
  • 1
  • 8
2
votes
2 answers

How to compare two dictionaries in c# and get the output as True and False after validation

I want to compare two dictionaries in c# so as to get the output as 'True' and 'False'.Here is the code i have so far : var dict3 = Dict.Where(entry => Dict_BM[entry.Key] != entry.Value) .ToDictionary(entry => entry.Key, entry =>…
2
votes
1 answer

Callgrind output does not include function calls

I have a simple .c program that makes a call to a function delcared and implemented in the same file. I compile it using gcc: gcc myProgram.c -o myProgram -g Then I use valgrind with callgrind to generate the callgrind.out.* file. valgrind…
user847988
  • 984
  • 1
  • 16
  • 30
2
votes
3 answers

can anyone check the program and tell me how can i get the correct output?

#include #include int main() { char a,b; printf("enter the firstkeyword \n"); a = getchar(); printf("enter your second keyword \n"); b = getchar(); if(a>b) { printf("it is '%c'…
1 2 3
99
100