C/stdio.h/puts — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 10:23, 25 мая 2010

puts: writes the string to the standard output device

    
//Header file:     #include <stdio.h>  
//Declaration:     int puts(const char *str); 
//Return:          returns a nonnegative value on success or an EOF upon failure. 
  #include <stdio.h>
  #include <string.h>
  int main(void)
  {
    char str[80];
    strcpy(str, "this is an example");
    puts(str);
    return 0;
  }
         
/*
this is an example
*/