Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Creation of dynamic property PPDStack::$accum is deprecated in /var/www/cppe.ru/www/includes/parser/Preprocessor_DOM.php on line 803
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/includes/exception/MWExceptionHandler.php on line 179
Deprecated: Constant E_STRICT is deprecated in /var/www/cppe.ru/www/vendor/mediawiki/at-ease/src/Functions.php on line 48
Материал из C\C++ эксперт
Check how many char have been outputed from printf
#include <stdio.h>
int main(void)
{
int i;
printf("%d %f\n%n", 100, 123.23, &i);
printf("%d characters output so far", i);
return 0;
}
Flush a stream: how to use fflush
#include <stdio.h>
int main()
{
char string[80];
printf( "Enter a string: " );
scanf( "%s", string );
printf( "The string you entered is : %s\n", string );
fflush ( stdin );
return 0;
}