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
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is array of structure in c programming?
what do you mean by enumeration constant?
State two uses of pointers in C?
Give differences between - new and malloc() , delete and free() ?
When is the “void” keyword used in a function?
What is the use of typedef in structure in c?
Which one would you prefer - a macro or a function?
Why structure is used in c?
What are the salient features of c languages?
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.?
Write a program for finding factorial of a number.
A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles
How important is structure in life?
How many types of operator or there in c?