how to concatenate the two strings



how to concatenate the two strings ..

Answer / hasini

simple steps:


String s1 = "Hello, ";
String s2 = "world!";
String s3 = s1 + s2;
System.out.println(s3);
// prints out: Hello, world!

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Code Interview Questions

How to access command-line arguments?

4 Answers  


main() { char not; not=!2; printf("%d",not); }

1 Answers  


main( ) { int a[2][3][2] = {{{2,4},{7,8},{3,4}},{{2,2},{2,3},{3,4}}}; printf(ā€œ%u %u %u %d \nā€,a,*a,**a,***a); printf(ā€œ%u %u %u %d \nā€,a+1,*a+1,**a+1,***a+1); }

2 Answers  


How to palindrom string in c language?

6 Answers   Google,


How to swap two variables, without using third variable ?

104 Answers   AB, ADP, BirlaSoft, Cisco, Cygnet Infotech, HCL, Hewitt, Honeywell, HP, IBM, Infosys, Manhattan, Microsoft, Mobius, Percept, Satyam, SofTMware, TCS, Wipro, Yamaha,






Write a program to receive an integer and find its octal equivalent?

7 Answers  


write a c program to Reverse a given string using string function and also without string function

1 Answers  


main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }

1 Answers   Zoho,


Implement a t9 mobile dictionary. (Give code with explanation )

1 Answers   Amazon, Peak6, Yahoo,


Write a routine to draw a circle (x ** 2 + y ** 2 = r ** 2) without making use of any floating point computations at all.

2 Answers   Mentor Graphics, Microsoft,


main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }

1 Answers  


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


Categories