answersLogoWhite

0

#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

15y ago

What else can I help you with?

Continue Learning about Engineering

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


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.


Why is stack pointer value 07h?

The stack pointer value of 07h typically indicates the current position of the stack in memory, often reflecting where the next data will be pushed or popped. In a system using hexadecimal notation, 07h corresponds to the decimal value of 7, which may represent a specific memory offset within the stack segment. This value can change dynamically during program execution as data is pushed to or popped from the stack. Ultimately, the stack pointer's value helps manage the call and return addresses, local variables, and function parameters in a program's execution context.


How do you increase the stack size of cc1plus dot exe for GCC 4 5 2 so it doesn't stack overflow?

If a stack is overflowing then there is usually some fundamental flaw in the program design. The best solution is to redesign the program. That said, one possible workaround might be to turn off optimisations with QMAKE_CXXFLAGS += -O0. However, it's far better to understand exactly why the stack is overflowing in the first place, and redesign the code to ensure it never happens. If you genuinely need a larger stack, then you can alter it programmatically using setrlimit.

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.


Why you will declare top as -1 for stacks to be empty in c program?

You would do this if you implement a stack using an array. Using a zero-based index to keep track of the top of the stack (the end of the array) means we must use the value -1 to indicate an empty stack. This is because an array of n elements will have indices 0 through n-1, where index n-1 represents the element at top of the stack. An empty stack has 0 elements, therefore the top of the stack is represented by index -1.