write a program to copy a string without using a string?

Answer Posted / j j ramesh

void main()
{
char str1[100],str2[100];
printf("ENTER THE STRING :");
gets(str1);
for(i=0;str1[i];i++)
str2[i] = str1[i]l
pritf("COPIED : %s",str2);
}

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the acronym for ansi?

623


Is python a c language?

548


What are the different file extensions involved when programming in C?

749


What is the sizeof () operator?

616


What is meant by preprocessor in c?

526






Explain how do you list files in a directory?

610


What are the general description for loop statement and available loop types in c?

681


What is #include cctype?

572


What is main () in c?

584


Did c have any year 2000 problems?

647


What is the difference between #include and #include 'file' ?

602


Why should I use standard library functions instead of writing my own?

665


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

683


what are bit fields in c?

599


What is property type c?

599