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
0 answers

How do I redirect output for an already running process in c#

I'm launching a new process from a service (Administrative privileges) in C# by using a custom DLL written in c++ that basically modifies the security and privileges to reduce it. This is because the new process when run through Ring 0 of Windows 7…
rboy
  • 2,018
  • 1
  • 23
  • 35
2
votes
2 answers

What's so standard about standard input or standard output?

Why can't they just call it input or output? This is more of a historical question I think than a programming question.
user2926999
  • 393
  • 1
  • 3
  • 11
2
votes
2 answers

gfortran - Is unspecified decimal length allowed for real output?

Is there a way to format a real number for output such that both the width and decimal parts are left unspecified? This is possible with ifort by just doing the following: write (*, '(F)') num ...but I understand that that usage is a…
pattivacek
  • 5,617
  • 5
  • 48
  • 62
2
votes
1 answer

Basic read/write clarification in C

I'm trying to understand how to read and write in C. Would this store entries from the binary file into the buffer until the end of file. unsigned char *buffer = (char*) malloc (sizeof(char) * SIZE); FILE *file = fopen(FILEPATH, "rb"); if(file ==…
wzsun
  • 295
  • 2
  • 7
  • 15
2
votes
1 answer

Prevent $ArrayList.Add from outputting new index to host?

In PowerShell, how do I prevent [System.Collections.ArrayList]$ArrayList=@() ; $ArrayList.Add("New thing") from sending the value of the new index to host? Thanks!
Macklin
  • 146
  • 1
  • 1
  • 8
2
votes
2 answers

How to use pprint-newline properly?

I am trying to print a sequence such that neither the whole sequence is printed on one line, nor is each element of the sequence printed on its own line. E.g. [10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29] I found pprint-newline in…
dtg
  • 1,803
  • 4
  • 30
  • 44
2
votes
2 answers

Overloading the << operator

I am trying to overload the << operator. I have successfully overload the other operators but this last one is giving me trouble. Maybe it just needs a new set of eyes. I have a feeling it is all being caused by a const qualifier. Where I need the…
Trevor Hutto
  • 2,112
  • 4
  • 21
  • 29
2
votes
2 answers

Create a log file from a copy batch file

I have a COPY batch file that copies a file to multiple computers (about 300, which is being read from a separate text file), and I would like to see the results of the file copy. If I can see both the successful and failed file copies, that would…
Mike
  • 23
  • 1
  • 1
  • 5
2
votes
1 answer

GMP floating values - print them with given precision in base 10

Let's say I have a mpf_t number; that equals 1.25. I want to print it with a given precision, even if there would be trailing zero's, for example 1.2500000 When I try to print it by using a mpf_get_str function, it prints in scientific (e)…
user905747
  • 613
  • 1
  • 9
  • 18
2
votes
3 answers

Formatter - show weird output

I tried to work with easy example of java.util.Formatter class. To my mind it works exactly as System.out.printf(). But my easy program show unexpected result. Can smb explain why? Expected is at the single line name of field: and value of this…
catch23
  • 17,519
  • 42
  • 144
  • 217
2
votes
5 answers

How to process raw data (in python)?

***I'm not explaining this well so hopefully this edit makes more sense: basically I have to write code that will work for a ton of test cases, the input below is just an example. So I can't manually enter the input into my function Say I have the…
Noob Coder
  • 949
  • 2
  • 10
  • 17
2
votes
2 answers

How to align the output in java from right?

I want to align my output in java as follows: 1234 *3406 ---------------- 7404 0 4936 3702 ----------------- 4201004
Milan kc
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

Console output style, formatting best practise

How do you prefer to format output of your console scripts? I mean output produced during application run (log, stdout). BG: I have a python script that takes a data, processes it, updates some related data in my database and outputs progress. I can…
Dmitry P.
  • 356
  • 2
  • 13
2
votes
3 answers

Is there a way in C++ to get the output of a loop to display on the same line?

I'm in an introductory C++ class at my university. We were assigned a project to create a program to approximate pi using a series where pi=summation ((-1)^i+1)*(4/2i-1). I need my output to look like this: This program approximates pi using an…
2
votes
2 answers

Align Double (Variable) Columns in System Output

import javax.swing.JOptionPane; public class HW { public static void main(String[] args) { String x1 = JOptionPane.showInputDialog(null, "X: "); String y1 = JOptionPane.showInputDialog(null, "Y: "); double x = Double.parseDouble(x1); …
Modify You
  • 153
  • 4
  • 14
1 2 3
99
100