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 size of structure in c?
What does printf does?
What is a pragma?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are predefined functions in c?
What is extern c used for?
Write a program to generate random numbers in c?
What is an operator?
Can you mix old-style and new-style function syntax?
Why double pointer is used in c?
What are two dimensional arrays alternatively called as?
What is the use of header?
Is there a way to switch on strings?
How can I find the modification date and time of a file?
What is the difference between āgā and āgā in C?