Sujet : Re: Counting Characters!!
De : news.dead.person.stones (at) *nospam* darjeeling.plus.com (Mike Terry)
Groupes : comp.lang.c++ alt.comp.lang.c++.miscDate : 14. Sep 2024, 22:04:00
Autres entêtes
Message-ID : <-5-dnduzoNPcZ3j7nZ2dnZfqn_ednZ2d@brightview.co.uk>
References : 1 2
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2
On 14/09/2024 20:41, Chris Ahlstrom wrote:
DMZ wrote this copyrighted missive and expects royalties:
This simple program will count characters for you!!
>
#include <stdio.h>
>
int main()
{
printf(" = %d characters", printf("Hello World!"));
>
return 0;
}
Cute.
Right - if you want a program that tells you there are 12 characters in the string "Hello world!" this one is right up there with the others... But the technique used doesn't always work - TAKE CARE when adapting the code for your own programs!
Mike.