Answer Posted / ankitecian
int main(int argc, char *argv[])
{
char _output[200];
memset(_output,'\0',200);
if(argc < 2)
{
printf("Usage: <%s> <String -1>\n",argv[0]);
return -1;
}
StrCpy(_output,argv[1]);
printf("The Final String is::: \n[%s]\n",_output);
return 0;
}
int StrCpy(char *_output, const char *_input1)
{
int _cntr1 = 0;
while(*(_input1 + _cntr1) != NULL)
{
*(_output + _cntr1) = *(_input1 + _cntr1);
_cntr1++;
}
return 0;
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is the difference between mpi and openmp?
What are structural members?
What is time null in c?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What are the standard predefined macros?
What is type qualifiers?
What is difference between structure and union in c?
What does %c mean in c?
What is array within structure?
What is file in c preprocessor?
What are qualifiers?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
Explain how can you tell whether two strings are the same?
What is static and volatile in c?
What is the purpose of 'register' keyword?