answersLogoWhite

0


Best Answer

#include
#include

using std::cin;
using std::cout;
using std::endl;
using std::string;

int main(void)
{
string str1 = "nothing here";
cout << endl << "Enter a first string: ";
cin >> str1;

string str2 = "neither here";
cout << endl << "Enter a second string: ";
cin >> str2;

string srt = "result here";
cout << endl << "First string is: " << str1
<< endl << "Second string is: " << str2
<< endl << "Concatenation of two strings is: " << srt1 + str2
<< endl;

system("PAUSE");
return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a C program for concatenation of two strings using stack?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

C program to copy two strings in to a new string with out using stringcopy in borland c?

You can use so called concatenation of strings:{...string str1 = "something here";string str2 = " and something here";string newStr = str1 + str2;...}


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language


How can you do the same thing as the program below but using strings and arrays in C language?

Program below?!


C program to implement tower of hanoi using array implementation of stack abstract datatype?

stack abstract datatype


Can you use stack in microprocessor for storage of data?

Yes, but not for long term storage, only while a program is executing using its stack.


Write a c program to copy two strings using pointers?

nahi malum


Write a program to convert stack into queue using c language?

In order to write a program to convert stack into queue using c language you must be able to identify the proper program. Having a special certification in programing will be beneficial as well to make sure you recognize the proper queues for the programs.


What is flowchart of stack using array in c prog?

Two little problems: 1. stack doesn't have a flow-chart 2. there are no flow-charts in a C program


What are advantages of stack?

some disadvantages created in stack using array then that problem solve to linked list use in stack.First advantage for size of stack not limited in linked list using.second essay to stack programme implement using only one pointer.


When you delete an item from the empty stack will the program execute?

If the program correctly checks the error-conditions, it will terminate -- otherwise it will do... something, e.g. using memory-garbage as data.


Can you tell me a C program to find if the strings are equal using pointers?

It is called strcmp, part of the standard run-time library. Returns 0 if the two strings are equals, non-zero otherwise.


How to perform string operations like concatenation compare etc without using built in functions?

performing string operation using pointers