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 realloc in c?
What is external variable in c?
What is hungarian notation? Is it worthwhile?
State two uses of pointers in C?
Explain what does it mean when a pointer is used in an if statement?
Where static variables are stored in c?
Explain the use of 'auto' keyword
Does c have enums?
What is typedf?
What are data types in c language?
Why clrscr is used in c?
How can I direct output to the printer?
What is void main ()?
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Differentiate call by value and call by reference?