code for copying two strings with out strcpy() function.

Answer Posted / ali

#include<iostream.h>
void main(void)
{
char first[]="sajid";
char second[6];
int index;
for(index=0;index<6;index++)
{
second[index]=first[index];
}
cout<<second;
}

Is This Answer Correct ?    8 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why doesn't C support function overloading?

2154


Write a code of a general series where the next element is the sum of last k terms.

799


What is the difference between far and near ?

919


what is reason of your company position's in india no. 1.

1965


Explain what are the advantages and disadvantages of a heap?

841


What is the difference between formatted&unformatted i/o functions?

814


What was noalias and what ever happened to it?

770


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

3091


Wt are the Buses in C Language

2956


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5203


a c code by using memory allocation for add ,multiply of sprase matrixes

2518


Are pointers integer?

750


How do I convert a string to all upper or lower case?

861


we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?

1025


How can you call a function, given its name as a string?

899