Random
Source Code

%s

Format code tag that literally means "Replace this by a string of characters". Orinigally introduced in the C programming language as a format specifier for the printf function, it was later adopted by a plethora of other languages such as java, ruby, etc.

In C:

name = (char *)"Danny Boy";
printf("Hello '%s'.",name);

Produces;

Hello Danny boy.

Syntax is almost identical in any other language that implements printf.

by Grijando December 2, 2004

4054👍 1995👎