My Blog
Articles related to programming, computer science, technology and research.

C program to reverse a given string

09/07/2016 Categories: Strings. Comments Off on C program to reverse a given string

A C program to reverse a given string without using predefined function. Program is as follows: #include<stdio.h> #include<string.h> int main() { char str[20]; printf(“Enter a string: “); scanf(“%s”, str); int length = strlen(str); for(int i=0, j=length-1; i<j; i++, j–) { int temp = str[i]; str[i] = str[j]; str[j] = temp; } printf(“Reversed string is: %s”, […]

Read the rest of this entry »

C program to compare two strings

09/07/2016 Categories: Strings. Comments Off on C program to compare two strings

A C program to compare two strings without using predefined function. Program is as follows:

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to concatenate two strings

09/07/2016 Categories: Strings. Comments Off on C program to concatenate two strings

A C program to join or concatenate two strings without using predefined function. Program is as follows:

Input and output for the above program are as follows:

 

Read the rest of this entry »

C program to copy one string to another

09/07/2016 Categories: Strings. Comments Off on C program to copy one string to another

A C program to copy one string to another without using predefined function. Program is as follows:

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to find the length of a string

09/07/2016 Categories: Strings. Comments Off on C program to find the length of a string

A C program to find length of a string without using predefined function. Program is as follows:

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to implement predefined string functions using user defined functions

06/05/2016 Categories: Strings. Comments Off on C program to implement predefined string functions using user defined functions

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to find the length and to check a string is palindrome or not using user defined functions

06/05/2016 Categories: Strings. Comments Off on C program to find the length and to check a string is palindrome or not using user defined functions

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to compare, concatenate and append strings using user defined functions

06/05/2016 Categories: Strings. Comments Off on C program to compare, concatenate and append strings using user defined functions

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to perform the following operations on strings using functions

06/05/2016 Categories: Strings. Comments Off on C program to perform the following operations on strings using functions

 

Input and output for the above program is as follows:

 

Read the rest of this entry »
Scroll Up