C Program to demonstrate modf function.

Write a C program to demonstrate modf function.modf() defined in the C math.h library.modf function breaks the double/float values to integral part and fractional part. Example: res = modf(3.142, &iptr) returns res=142 and iptr=3. Read more about C Programming Language . and read the C Programming Language (2nd Edition). by K and R. /************************************************************ You can …

Anagram Program in C – Check if Two Strings are Anagrams

An anagram is a word or phrase formed by rearranging all the characters of another. In C, the standard way to check if two strings are anagrams is to count character frequencies: if both strings have exactly the same character counts, they are anagrams — regardless of order. This page shows a complete anagram program …

C Program to check matrix is magic square or not

A magic square is a square matrix in which the sum of every row, every column, and both main diagonals is the same number (called the magic constant). This C program reads a square matrix and checks whether it is a magic square. Example: 8 1 6 3 5 7 4 9 2 Every row, …

C Program to delete vowels in a string.

C Strings:Write a C Program to delete a vowel in a given string.In this program, We use the pointers to position the characters.check_vowel() function checks the character is vowel or not, if the character is vowel it returns true else false.Example output:Given string: Check vowelOutput is: Chck vwlRead more about C Programming Language . and …

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 …