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 do you know about the use of bit field?

622


What are global variables and explain how do you declare them?

595


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

672


what is the syallabus of computer science students in group- 1?

1856


What is the meaning of && in c?

558






What are the 5 data types?

615


Tell me can the size of an array be declared at runtime?

609


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

1612


What is the difference between declaring a variable by constant keyword and #define ing that variable?

2730


What is difference between union All statement and Union?

646


void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }

1273


Where are some collections of useful code fragments and examples?

727


What is local and global variable in c?

629


number of times a digit is present in a number

1551


What functions are in conio h?

675