C Program to delete a file.

Write a C Program to delete a file.To delete a file in c, We use the remove macro, which is defined in stdio.h. remove macro takes filename with extension as its argument and deletes the file, if it is in the directory and returns the zero, if deleted successfully.Note that deleted file does not goes …

C Program to demonstrate strspn function.

Write a C Program to demonstrate strspn function.The strspn() function returns the index of the first character in string1 that doesn’t match any character in string2. If all the characters of the string2 matched with the string1, strspn returns the length of the string1. Read more about C Programming Language . /************************************************************ You can use …

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 find the size of a given file.

Write a C Program to find the size of a given file.The function fseek() is used to set the file pointer at the specified position. In general, it is used to move the file pointer to the desired position within the file.In this program we moved the file pointer to the end of file, and …

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 …