Author: yashan
C program to merge two sorted arrays
Program in the C programming language to merge two sorted arrays. Note that after this code is compiled, the elements of the arrays should be entered in the ascending order as the program is made according to it. Below is the code of the C program –
Program in C to transpose a 2D array
Transpose means changing the rows of 2D array into columns and columns into rows. Below is the code in the C programming language to transpose a two dimensional array –
C program to delete an element from the array
Data structure’s C program to delete an element from the array. Enter the array size and then it’s elements. After this enter the location of the element you want to delete and the item will be deleted. Below is the code of the above program
C program to insert an element in the sorted array
Insertion is one of the operations performed on the arrays. So below is the program in C language to insert an element / item in the sorted array –
C – strcmp( ) function – Compare Strings
Strcmp() in C programming language is used to compare two strings. If both the strings are equal then it gives the result as zero but if not then it gives the numeric difference between the first non matching characters in the strings. Syntax of C strcmp() function is–
Strcat() function in C – Concatenate strings
The strcat() function is used for string concatenation in C programming language. It means it joins the two strings together. Its syntax is as follows – strcat(string1,string2); String1 and string2 are character arrays. It concatenates (joins) second string at the end of the first string. It does so by removing the null character at the…
C – Strcpy() function
Strcpy() Fucntion – In C, strcpy() function is used to assign the contents of the one character array (string) to the other character array. The syntax for the strcpy() fucntion is– strcpy(string1,string2);
C strlen() function to get the string length
strlen( ) function definition – In C, strlen( ) function is used to calculate the length of the string. It means that it counts the total number of characters present in the string which includes alphabets, numbers, and all special characters including blank spaces. It’s syntax is as follows –
C program to insert an element into the array at given location
Program in the C programming language for the insertion of an element in the array at any given location. Below is the code for the C program –