C Program to replication of string

Write a c program to implement the replication of string which will be given as a command line argument?

Showing Answers 1 - 2 of 2 Answers

Abhishek

  • Nov 11th, 2011
 

Code
  1. #include <stdio.h>

  2. #include <stdlib.h>

  3. #include <string.h>

  4. "%s

  5. ""ha"

  Was this answer useful?  Yes

saurabh singh

  • Jun 19th, 2014
 

Here is a simple code using command line argument to print multiple number of strings with "_" between them.

To check the output , type this in command prompt : filename ABC 5
OUTPUT: ABC_ABC_ABC_ABC_ABC

Code
  1.  

  2. #include<stdio.h>

  3. #include<stdlib.h>

  4. "Enter CLA""%s""_%s "

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions