Answer Posted / shanmugavalli
char* strncpy(char* dest,const char* src,int n)
{
while(n>0)
{
if (!(*dest = *src)) break;
src++;
dest++;
n--;
}
if (n<=0) *dest = '\0';
return dest;
}
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
What is function overloading in C++?
What is the use of :: operator in c++?
what are the characteristics of Class Members in C++?
What are the five basic elements of a c++ program?
How do you define a class in c++?
Eplain extern keyword?
What does namespace mean in c++?
Which operations are permitted on pointers?
Is multimap sorted c++?
What is insertion sorting?
What is scope in c++ with example?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
What is bubble sort c++?
What is ios in c++?
What is the iunknown interface?