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 c programing language?
Is c language still used?
Where are c variables stored in memory?
What is memcpy() function?
Are enumerations really portable?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
Why is this loop always executing once?
What is an endless loop?
how to make a scientific calculater ?
Where in memory are my variables stored?
How many levels of pointers have?
Explain what is the benefit of using enum to declare a constant?
What is sizeof array in c?
What is the meaning of c in c language?
Explain Function Pointer?