Top "Puts" questions

Anything related to C or C++ standard library, or Ruby functions `puts` (C, Ruby) or `std::puts` (C++). These functions are used to write a null-terminated string (C, C++), or Ruby's `String` class to the standard output stream `stdout`.

What is the difference between printf() and puts() in C?

I know you can print with printf() and puts(). I can also see that printf() allows you to interpolate variables …

c string output printf puts
Ruby: method to print and neat an array

I am not sure if this question is too silly but I haven't found a way to do it. Usually …

ruby arrays class puts
C puts() without newline

I currently have this program that prints a text file on the console, but every line has an extra new …

c file newline puts
expect puts write to file

I am writing an expect script that will ssh into several IPs to test their connectivity. I would like to …

file bash expect channel puts
`to_s` isn't converting an integer to a string

I am calling to_s within a method: $ def my_function(num) $ number = num.to_s.split(//) $ puts number $ end $ …

ruby puts
Why is printf with a single argument (without conversion specifiers) deprecated?

In a book that I'm reading, it's written that printf with a single argument (without conversion specifiers) is deprecated. It …

c security printf format-specifiers puts
Ruby puts string and integer on same line

I just started learning Ruby and uncertain what is causing the error. I'm using ruby 1.9.3 puts 'What is your favorite …

ruby-on-rails ruby puts
basic Tcl -- printing a value of variable

I have the following script in Tcl: set val(a) 10 set val(b) 10 set val(n) expr{$val(a) * $val(…

set tcl puts
Why are all my puts returning =>nil?

I know this may seem like a really simple question, but it really bothers me that my puts keep generating "=&…

ruby null puts
C Struct Array Input

I have the following struct typedef char String[256]; typedef struct { String name; int year; float price; } Book; Array of Books …

c printf scanf gets puts