v can concatenate two string by using a function like: select CONCAT( CONCAT('ename','e_mrks'),"name","marks" from student;
a write the algorithm to concatenate two given string
Whatever you want. Concatenate them, for example.
In VB.NET, you can define variables a, b, and c, and then concatenate them to form abc like this: Dim a As String = "a" Dim b As String = "b" Dim c As String = "c" Dim abc As String = a & b & c This code initializes three string variables and uses the & operator to concatenate them into a new string abc.
Normally yes, but it will actually take numbers and combine them into a text string.
That really depends on the programming language. In Java, it is sufficient to concatenate it with a String: int myNumber = 5; result = "" + myNumber; Other languages may require a special function, or method, to convert from integer to string.
Language dependent. In C, for example, there no string as such, but you can use function strcat to concatenate zero-terminated character-sequences.
In MS SQL, you can use the char() operator on the column. For example: select 'some string content ' + char(integer_field) from my_table
Scanner scan = new Scanner("[input method]"); // input method could they key board //(System.in) or a String String one = scan.next() + scan.next(); // get the first 2 words and concatenate String two = scan.next(); // the remaining word
#include#includevoid main(){char a[30],b[30];clrscr();printf("Enter the string a:");gets(a);printf("Enter the string b:");gets(b);printf("%s",strcat(a,b));getch();}
"+" is the concatenation operator in Java. It can be used to concatenate two strings. Ex: String firstName = "John"; String lastName = "Morrison"; System.out.println(firstName + " " + lastName); The above code snippet would display John Morrison in the console.
String and array are not related to one another so they have many differences. a. A string is used to hold alpha numeric values inside it b. An Array is used to hold multiple values of any primitive data type c. A String has operations like equals, concatenate, substring etc whereas an array does not have them d. You can iterate through an array but we cannot iterate through a string.
strcat