code for concatination of 2 strings with out using library
functions?

Answer Posted / chavidi

void main()
{
char a[20],b[20];
int i,j,k;
gets(a);
gets(b);
i=strlen(a);
k=i+strlen(b);
j=0;
while(i<=k)
{
a[i]=b[j];
i++;
j++;
}
printf("Resultant String is %d :",a);
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what are bitwise shift operators in c programming?

591


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

618


What do you mean by recursion in c?

634


Explain how do you determine the length of a string value that was stored in a variable?

674


What are the different properties of variable number of arguments?

669






What is break statement?

639


Tell me what is null pointer in c?

617


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

750


What is meant by gets in c?

613


Why pointers are used?

635


What are the advantages of Macro over function?

1211


What are actual arguments?

652


How can you find the exact size of a data type in c?

603


I have seen function declarations that look like this

608


what are the facialities provided by you after the selection of the student.

1664