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

How many levels of pointers can you have?

699


Explain what are bus errors, memory faults, and core dumps?

788


How can I make it pause before closing the program output window?

579


Explain what are run-time errors?

607


What are runtime error?

625






Does c have circular shift operators?

730


Explain what is page thrashing?

609


write a program fibonacci series and palindrome program in c

630


Explain what is the concatenation operator?

626


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1633


FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above

621


How will you declare an array of three function pointers where each function receives two ints and returns a float?

777


Explain what does the function toupper() do?

631


What is a null pointer in c?

594


What is the use of pragma in embedded c?

590