answersLogoWhite

0

char* strcat (char* destination, const char* source) {

char* return_value = destination; // temp destination for return

while (*(destination++) != '\0'); // find end of initial destination

while ((*(destination++) = *(source++)) != '\0'); // copy source to end of destination

return return_value; // return original value of destination

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


How do you write words using CHAR function?

The CHAR function in Excel or other spreadsheet applications is used to return a character specified by a code number. For example, CHAR(65) returns the letter "A" because 65 is the ASCII code for "A." To write words using the CHAR function, you can concatenate multiple CHAR functions together, such as =CHAR(72) & CHAR(101) & CHAR(108) & CHAR(108) & CHAR(111) to spell "Hello." This method allows you to create strings by combining the ASCII values of the desired characters.


What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


Write javascript code to display a list of strings?

You need to put the strings in an array, and then loop through the array to output the strings. Something like this would be a simple example: ---------------- var strings = ["s1","s2","s3"]; for ( var i in strings ) { document.write( strings[i] ); }

Related Questions

A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


Why pointer is used to reference a string of characters write C plus plus statements that display the text hello using pointer to a string notation?

We use a pointer to reference a string because a string is an array of characters where every element is a char (or a wchar_t if using UNICODE strings). Passing arrays by value would require the entire array to be copied, but passing a pointer variable to an array only copies the pointer, which is effectively the same as passing the array by reference. #include <iostream> int main() { char * psz = "hello"; // pointer to a null-terminated string. std::cout << psz; // pass the pointer (by value) to the insertion operator. return( 0 ); }


Write a c program to copy two strings using pointers?

nahi malum


How do you write the factor strings using exponents for 8x8x8x8x8?

8 = 23 85 = 215


You want to write a simple without using pointer or array c program which will print greatest number when you give 20 number?

i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?


How do you write words using CHAR function?

The CHAR function in Excel or other spreadsheet applications is used to return a character specified by a code number. For example, CHAR(65) returns the letter "A" because 65 is the ASCII code for "A." To write words using the CHAR function, you can concatenate multiple CHAR functions together, such as =CHAR(72) & CHAR(101) & CHAR(108) & CHAR(108) & CHAR(111) to spell "Hello." This method allows you to create strings by combining the ASCII values of the desired characters.


Can you write a grammar for the language consisting of strings?

Yes, a grammar for a language consisting of strings can be written using production rules that define how strings can be formed. Each rule specifies how different parts of a string can be combined or modified. The grammar can include rules for creating basic strings, concatenating strings, repeating characters, and more complex patterns.


Should i added strings to my composition?

Yes, but only if you actually know how to write for strings.


How do you write C plus plus string concat without builtin functions?

#include<iostream> #include<string> int main() { // the two strings to concatenate std::string str1 = "Hello "; std::string str2 = "world!"; // allocate memory to the concatenated string with null-terminator char* str3 = new char[str1.size() + str2.size() + 1]; // initialise a moving pointer char* p = str3; // copy from the first string memcpy( p, str1.c_str(), str1.size() ); // advance the pointer p += str1.size(); // copy from the second string memcpy( p, str2.c_str(), str2.size() ); // advance the pointer p += str2.size(); // set the null-terminator *p = 0; // print concatenated string std::cout << str3 << std::endl; // tidy up delete [] str3, str3 = NULL; }


How do you write a C program to copy to strings using pointers?

mystrcpy (char* dest, char* src) { while ((*dest++ = *src++) != '\0); }


What is algorithm to write algorithm to the program to access a pointer variable in structure?

Here is the algorithm of the algorithm to write an algorithm to access a pointer in a variable. Algorithmically.name_of_the_structure dot name_of_the _field,eg:mystruct.pointerfield


How do you write talking strings in Cherokee?

syllabry


Write javascript code to display a list of strings?

You need to put the strings in an array, and then loop through the array to output the strings. Something like this would be a simple example: ---------------- var strings = ["s1","s2","s3"]; for ( var i in strings ) { document.write( strings[i] ); }


Pointer is a variable holding a memory address?

pointer is a derived datatype which contains memory addresses as their values. program:- #include<stdio.h> #include<conio.h> void main() { int m=5,*p; clrscr(); p=&m; printf("address of variable m is %p",(void *)p); }


What is mean by file handling in C programming?

There is a quite a lot of things you can do with files; some of them are: open, read, write, close, delete, copy, move, rename, concatenate, sort...


Write down the equivalent pointer expression for referring the same element aijkl?

it is a[i][j][k][l]; so in pointer reference: *(*(*(*(*(a+i)+j))+k)+l)


How would you write a program to swap the values of character variable using call by address?

void swap (int* a, int* b) { if (!a !b) return; // can't swap a pointer to null *a^=*b^=*a^=*b; }


What did the Inca's contribute to math?

The Incas did not have a writing system so they developed the quipu, which was a method using knots in strings to record numerical data. This way they did not have to write anything down for their records.


Write a script that accepts two strings from the user and compare two strings in web technology?

how to compare two strings that take input from the user and compare it. For example: i give first string as "THE" and give second string as "HTE" then return "match" if i give first as"THE" nd second string as "EHI" then return "NOtMatch" witout using STRCMP ... please help me


Which are the poems did Priscilla Pointer write for children?

Priscilla Pointer wrote a collection of poems for children titled "Remember the Magic". It features whimsical and imaginative poetry that is suitable for young readers. Pointer's poems aim to inspire creativity and wonder in children.