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 count number of characters in the file

C Program to count number of characters in the file. In this program you can learn c file operations. Here we counting the characters by reading the characters in the file one by one and if read character was not an ‘n’ ,’t’ or EOF, it increments the counter by one. Read more about C …

C Program to demonstrate the ‘getchar’ function.

Program to demonstrate the getchar function. The program will read data entered via the keyboard. And returns the number of characters entered. 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 …

C Program to demonstrate the ‘fgets’ function.

Program to demonstrate the ‘fgets’ function. The program will count the number of lines in a file. This is a function of the UNIX command ‘wc’. 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 …

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 demonstrate extern variable.

C Program to demonstrate extern variable. Extern variables are very useful in c,when the source code is in the two or more files, you can refer the variables from one file to another using extern variables. Extern variables are also global variable,but in explicit manner. Read more about C Programming Language . /************************************************************ You can …

C Program to demonstrate functions.

C Program to demonstrate functions. C Functions are block of codes, performs the specific task. Default function in C is main(). Advantages of the functions are easy to understand, coding, well defined tasks, easy error handling. There are several ways to call the functions like, pass by value, pass by reference etc.. Read more about …

C Program to demonstrate the ‘atof’ and ‘gets’ functions.

C Program to demonstrate the ‘atof’ and ‘gets’ functions. atof function converts the intial nptr string to the double. atof means ASCII to float. gets function reads string from the input stream. puts function prints string to the output stream This program will multiply to floating point numbers. The program will accept invalid data, and …

C Program to Demonstrate getting the parameters from the command line.

C Program to getting the parameters from the command line. To pass the arguments from command line, in main function we have to declare two arguments . First one is number of arguments passed to the program and other one is pointer variable which gives the list of arguments passed. Read more about C Programming …

C program to delete n Characters from a given position in a given string.

C Strings:C Program to delete the n characters from a given position from a given string. Here we use the gets() and puts() functions to read and write the string. delchar() function reads the character string and checks the length and position, then using strcpy() function it replaces the original string.Read more about C Programming …