sprintf function Demo

Understand how sprintf function works in C programming language with the help of an example. Here we demonstrate sprintf function in C language. If you have any questions, do feel free to comment.

void main(){
    char *str;
    char *first="Learn", *second = "C", *third="Online";
    sprintf(str,"%s%s%s.com is a great site", first, second, third);

LearnCOnline.com is a great site

Also See:
Explanation on sprintf function

You may also like...

2 Responses

  1. Anonymous says:

    Learn C Online

    I don’t understand how it comes LearnCOnline.com is a great site.

  1. March 1, 2014

    […] Program to Demonstrate sprintf function in C […]

Leave a Reply

Your email address will not be published. Required fields are marked *

FREE C Cheatsheet - Speed Up Your C Programming.

FREE C Cheatsheet - Speed Up Your C Programming.

Download a 7-page free cheat sheet for easy and quick access to C Concepts, Snippets, and Syntax.

Thank you! Check you inbox and access your cheat-sheet