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
Explain what are the different file extensions involved when programming in c?
What is the newline escape sequence?
Hi can anyone tell what is a start up code?
Was 2000 a leap year?
How do I convert a string to all upper or lower case?
How can you check to see whether a symbol is defined?
What is memcpy() function?
What is the Purpose of 'extern' keyword in a function declaration?
What is action and transformation in spark?
What are qualifiers?
What is a buffer in c?
Write a program to generate random numbers in c?
Are the outer parentheses in return statements really optional?
Explain the difference between exit() and _exit() function?
what do you mean by enumeration constant?