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 [email protected]* To find more …

C Program to implement Simpson method.

Write a C Program to implement Simpson method.Simpson method is used for approximating integral of the function.Simpson’s rule also corresponds to the 3-point Newton-Cotes quadrature rule.In this program, We use the stack to implement the Simpson method. Read more about C Programming Language . /************************************************************ You can use all the programs on www.c-program-example.com* for personal …

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 leaves of the binary tree.

Write a C program to count the leaves of the binary tree.Binary tree is the ordered directed tree data structure, in which each node has at most two nodes.A node is called as a leaf node,  if it does not contains any child elements. In this program, We used the structures to create the binary …

C Program to implement hashing.

Write a C Program to implement hashing.Hashing is the function or routine used to assign the key values to the each entity in the database. Using hashing, We can easily access or search the values from database.In this program we used the open addressing hashing, also called as closed hashing.Read more about C Programming Language. …

C Program to implement address calculation sort.

Write a C Program to implement address calculation sort.Address calculation sort is the sorting method which sorts the given array by using insertion method.In this algorithm, a hash function is used and applied to the each key. Result of hash function is placed in the linked lists. The hash function must be a order preserving …

C Program to solve Dining philosophers problem.

Write a C Program to solve Dining philosophers problem.Dining philosophers problem is a classic synchronization problem.A problem introduced by Dijkstra concerning resource allocation between processes. Five silent philosophers sit  around table with a bowl of spaghetti. A fork is placed between each pair of adjacent philosophers. Each philosopher must alternately think and eat.Eating is not …

C Program to copy and concatenate strings without using standard functions.

C Program to copy and concatenate strings without using standard functions.In this program , we copy one string from another, and without using the standard library function strcpy from string.h .Here we appends the one string to another without using the strcat function. Read more about C Programming Language . /************************************************************ You can use all …

C Program to convert from infix expression into prefix expression

C Program to convert from infix expression into prefix expression.We use the infix expressions for the mathematical expressions in a program, these expressions will converted into equivalent machine instructions by the compiler using stacks.Using stacks we can efficiently convert the expressions from infix to postfix, infix to prefix, postfix to infix, and postfix to prefix. …