Top "Printf" questions

`printf` is a common function for formatted output.

call printf using va_list

void TestPrint(char* format, ...) { va_list argList; va_start(argList, format); printf(format, argList); va_end(argList); } int main() { TestPrint("…

c printf variadic-functions
Why use asprintf() instead of sprintf()?

I'm having a hard time understanding why you would need asprintf. Here in the manual it says The functions asprintf() …

c printf gnu asprintf
Is there a sprintf equivalent for node.js

Looking to do output formatting (sprintf type functionality) in node.js, but before I write it myself I was wondering …

printf node.js
Using printf with a non-null terminated string

Suppose you have a string which is NOT null terminated and you know its exact size, so how can you …

c string format printf
Printf is not printing anything to output? C++ SDL

I am trying to use "printf" in my Visual C++ project however it is not working. Using Lazy Foo's tutorial, …

c++ visual-c++ sdl printf
warning: format not a string literal and no format arguments

I want to remove the warning that i get on this line of the code, FILE *fil; char *imp; (...) fprintf(…

c++ c format warnings printf
Execution of printf() and Segmentation Fault

#include<stdio.h> int main() { char *name = "Vikram"; printf("%s",name); name[1]='s'; printf("%s",name); return 0; } There …

c segmentation-fault printf
How can I print a string to the console at specific coordinates in C++?

I'm trying to print characters in the console at specified coordinates. Up to now I have been using the very …

c++ printf coordinates cout
What does the %*s format specifier mean?

In some code that I have to maintain, I have seen a format specifier %*s . Can anybody tell me what …

c printf format-specifiers
How do I print some text in bash and pad it with spaces to a certain width?

I'm echoing some text in a bash script with a variable in it, and want to pad that variable so …

bash variables printing formatting printf