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
3
votes
2 answers

How does this nested loop output a list separated into 3 sections with 3 words in each section?

I'm very new to C#. I was curious on how this block of code printed out 3 separate lines with the 3 words in the arrays. Could someone explain how it works? using System; namespace MyFirstProgram { class Program { static void…
3
votes
2 answers

What causes the output of select-object to be truncated?

I have the following silly PowerShell script: $username = 'rny' $null = mkdir "c:\Users\$username\YYY" $null = mkdir "c:\Users\$username\YYY\TODO" $null = mkdir "c:\Users\$username\YYY\TODO\2021-12-22_Foo-bar-baz-etc" $files =…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
3
votes
1 answer

How to show actual result for floating-point division in C?

I am learning the C programming language and, in Xcode 13.x, when I write this: float a = 3 / 2; float b = 1 / 3; printf("3 divided by 2 as a float is %f, 1 divided by 3 as a float is %f\n", a, b); The console shouts out this: 3 divided by 2 as a…
NotationMaster
  • 390
  • 3
  • 17
3
votes
1 answer

SSIS MySQL ADO.net SQL Task Input & Output

I am trying to use a SQL Task in Visual Studio SSIS to get two output values stored to variables. I have done a range of Googling on the issue and have been able to get inserts working but I can't seem to see the output values to come out. I am have…
dcfretwell
  • 43
  • 5
3
votes
0 answers

Powershell: Command (getType) not returning any output to terminal under certain condition

I have the following code: # Much more efficient than using an Array and += $ArrayList = New-Object System.Collections.ArrayList [void]$ArrayList.Add([PSCustomObject]@{ Username = 'Scissile'; Path = 'C:\Users\Scissile'; Type =…
fmotion1
  • 237
  • 4
  • 12
3
votes
2 answers

In C, when may `fputc` return other than its first argument?

The C17 (N2176) standard states, "The fputc function returns the character written" (7.21.7.3) if there is no write error. But in the context of int c ; // ... later, c is assigned an "interesting" value ... int k = fputc ( c , stdout ) ; is k == c…
Ana Nimbus
  • 635
  • 3
  • 16
3
votes
1 answer

How to show message if the output is empty after filtering in sas

I’m trying to show a message or another table with empty record if the result is empty after putting an input. See below codes: %if (&number ne) %then %do; Proc print data=Lib.table; Var “number”n “name”n “age”n; Where…
Samantha
  • 31
  • 3
3
votes
1 answer

Webpack 5 [path] context

With this rule : { test: /\.php$/, type: "asset/resource", generator: { filename: "[path][name][ext]", }, }, My webpack config output files on this directory "views/src/views/client". I would like to remove the first two…
para
  • 51
  • 1
3
votes
1 answer

Why Process.Start produces ansi escape codes

I have a strange problem when using System.Diagnostics.Process (on a linux system). Something outputs ANSI escape sequences each time a Process is started. The sequence is [?1h= (DECCKM, DECKPAM), but that isn't produced by the called…
jeb
  • 78,592
  • 17
  • 171
  • 225
3
votes
2 answers

Create a binary file in java

These are the related questions that might cause my question to be closed, even though I specify another question: Java: How to write binary files? -> Doesn't really cover the point that I am talking about create a binary file -> Absolutely doesn't…
LeopardL GD
  • 139
  • 13
3
votes
2 answers

Python colored text to the terminal

We can set color text or foreground color text in the terminal in Python. I have gone through this SO's answer. Some of the example color code is here class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKCYAN = '\033[96m' OKGREEN…
mhhabib
  • 2,975
  • 1
  • 15
  • 29
3
votes
2 answers

How to silent an output from Prophet?

I`m using Prophet (Time series library by Facebook) and it makes a lot of output. Something like this: Prophet output I`m already silent some output like this: @contextmanager def suppress_stdout(): with open(os.devnull, "w") as devnull: …
josqa
  • 31
  • 6
3
votes
1 answer

Compoud operator (+=) and && in C, weird value

Looking at this code: #include #include int main(){ int a = -1; int b = 0xfc; // = 252 b+=a && a++; printf("%d %d\n", a, b); } the output I think should be is: 0 251 Actually, the real output is: 0 253 But why?…
Loris Simonetti
  • 217
  • 2
  • 10
3
votes
1 answer

The printf doesn't give output until I type a letter and press enter

#include #include int main() { float g1, g2, c1, c2, dismul, cadd, csub, dis; printf("Enter the latitudes of the places (L1 and L2): "); scanf("%f %f", &c1 ,&c2); printf("Enter the longitudes of the places (G1…
Meet Singh
  • 39
  • 6
3
votes
2 answers

How to hide multiple command output in fish shell?

Let's say there is a set of commands as follows: #!/usr/bin/env fish command1 command2 command3 Each command prints its own output, which I want to hide. In bash it's rather simple: #!/usr/bin/env bash { command1 command2 command3 } &>…
Zoltar
  • 43
  • 6