Printf and Puts in C - Printf and Puts in C Programming Language



Printf and Puts in C Programming Language

Learn c - c tutorial - Printf and Puts in C Programming Language - c examples - c programs

Printf and Puts in C Programming Language

Printf()

  • Type of operate functions predate C and different names are used notably "format" is known as “printf". Printf format strings which provide formatted output.

Puts()

  • Puts is used to display a string on a standard output device.
  • The puts() function automatically inserts a newline character at the end of each string it displays, so each subsequent string displayed with this function on its own line.
  • Non-negative on success or EOF on failure its returns.

Sample Code

#include <stdio.h>
int main()
{
    printf("Using printf...\n");
    printf("wikitechy 1.");
    printf("wikitechy 2.");
    printf("\n\n");
    printf("Using puts...\n");
    puts("wikitechy 1.");
    puts("wikitechy 2.");
    printf("End of main...\n");
    return 0;
}

Output

Using printf...
wikitechy 1.wikitechy 2.

Using puts...
wikitechy 1.
wikitechy 2.
End of main...


View More Quick Examples


Related Searches to Printf and Puts in C - Printf and Puts in C Programming Language