Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void str_cpy(const char *,const char *);
void main()
{
char a[20],b[20];
printf("enter the string for a[] :");
gets(a);
str_cpy(a,b);
printf("\nthe string for b[] is : ");
puts(b);
getch();
}
void str_cpy(const char *a,const char *b)
{
while((*a)^'\0')
{
*b=*a;
*a++;
*b++;
}
*b='\0';
}
thank u
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
How can you tell whether two strings are the same?
What is zero based addressing?
What is use of #include in c?
What is null in c?
An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?
a value that does not change during program execution a) variabe b) argument c) parameter d) none
The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference
why return type of main is not necessary in linux
In which header file is the null macro defined?
Why is struct padding needed?
Tell me about low level programming languages.
What is structure in c definition?
What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?