Computer Science, asked by Emjacobs, 1 year ago

What will be the output of the following C++ code?
#include
#include
void main()
{
char A[100]
char B[160]
cout<<"input string";
gets(A);
puts(A);
tolower(A);
cout<<"Input new string";
gets(B);
strcpy(A,B);
cout<<"Final String is"< }


Emjacobs: cout<<A;
Emjacobs: cout<<"Final String is"<<A; }

Answers

Answered by GoshtHunter
1
input string
Abc
Input new string
Xyz
Final string is
Xyz



There is mistake in final string you should print previous values and after strcpy in copies content of B to A in strcpy(A,B)
Answered by michan1
1
input string
yes
yes
input new string
no
final string is no

Emjacobs: do we have to input yes 2 times?
Similar questions