Write a program in C++ to concatenate two strings into third
string using pointers

Answer Posted / irshad

#include<iostream.h>
#include<conio.h>
#include<string.h>
void main()
{
char str1[50],str2[50];
cout<<"\n enter first string \n";
cin>>str1;
cout<<"\n enter second string \n";
cin>>str2;
cout<<"\n the concatenated string is \n"<<str1<<str2;
getch();
}

Is This Answer Correct ?    28 Yes 31 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to making game in c++ ?

2290


What are the different types of stl containers?

746


In what scenario does the Logical file and Physical file being used?

2428


Is string part of stl?

783


Can we use stl in coding interviews?

1391






What is stl language?

751


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

1737


Why should a c++ programmer be interested in stl?

725


When did c++ add stl?

836


How connect plc and pc through software

2036


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

1948


What is a stl vector?

710


Who created stl?

743


Is stl open source?

719


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.

2414