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
What is the right type to use for boolean values in c? Is there a standard type?
What are the types of assignment statements?
How do you construct an increment statement or decrement statement in C?
What is #pragma statements?
What happens if a header file is included twice?
PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE
How can you allocate arrays or structures bigger than 64K?
Difference between pass by reference and pass by value?
write a progrmm in c language take user interface generate table using for loop?
What is the sizeof () operator?
Explain two-dimensional array.
How is null defined in c?
What is dangling pointer in c?
Explain the red-black trees?
Explain what is meant by 'bit masking'?