Write a C program to reverse a string using pointers.

C Strings:Write a C program to reverse a string using pointers.In this program, we reverse the given string by using the pointers. Here we use the two pointers to reverse the string, strptr holds the address of given string and in loop revptr holds the address of the reversed string. Read more about C Programming …

Advertisements

C program to replace the sub string with another string.

C Strings:Write a C program to replace the sub string in a string with another string.In this program, We replace string with another string, if the entered string is the sub string of main string, otherwise function replace_str returns the original string as it is. Read more about C Programming Language . /************************************************************ You can …

C Program to find all the permutations of a given string.

Write a c program to find all the permutations of a given string.Example: If the given string is sam, output is,samsmamsamasasmams.Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal and learning purposes. For permissions to use the* programs for commercial purposes,* contact info@c-program-example.com* To find more …

C Program to find the position of a sub string.

C Strings:C Program to find the position of a sub string in a given string.In this program, We find the position of a sub string where it starts  in the main string. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal and learning purposes. For permissions …

C Program to count the number of occurrences of particular word in a string

C Program that counts the particular word in the given string. For example in the string ” the string is the set of charterers” , Number of occurrences of “the” is:2. Read more about C Programming Language . /*********************************************************** * You can use all the programs on www.c-program-example.com * for personal and learning purposes. For …

C program to find the character type.

C Program to find the Character types. Here we used the isdidit(), isalpa(), and isspace() functions.isdigit() function returns true if argument is a decimal digit, otherwise false. isalpa() function returns true if argument is a defined set of characters in c, otherwise false. isspace() function returns true if argument is a white space character (one …

C Program to compare two strings

C Strings: C Program to accepts two strings and compare them, Finally it prints whether both are equal, or first string is greater than the second or the first string is less than the second string. The string comparison starts with the first character in each string and continues with subsequent characters until the corresponding …

C Program to implement strlen function

Write a c program to find the length of a string without using the built-in function strlen(). Program will calculate the length of the string using for loop by going through each character of the string, till its end. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* …

C Program to convert days to years, weeks and days

Write a C Program to convert given number of days to a measure of time given in years, weeks and days. For example 375 days is equal to 1 year 1 week and 3 days (ignore leap year).Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal …

C Program to accept a string and a substring and check if the substring is present in the given string

C Strings:Write a C program to accept a string and a substring and check if the substring is present in the given string. Program search’s given substring is in the string or not, and prints the appropriate message. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for …