Category: Strings in C

Interested in learning C++ Programming? Click here...


C program to read a string 4

C program to read a string and replaces every 5th character with “X”

The below program in C will accept a string from user. It will then process the string and replace every 5th character of the string with a character “X”. Here is the C code.

C Output

C Programming is brought you by LearnCOnline.com

Sort character array in ascending order in C 7

C program to sort character array (string) in ascending order

Below is the simple C program that will accept the character string from the user, calculates the length of the string and performs sorting operation on the string. The program will sort the character array in ascending order and display the result string (character array). Here we go,

C Programming is brought you by LearnCOnline.com


sprintf function Demo 2

sprintf function Demo

Understand how sprintf function works in C programming language with the help of an example. Here we demonstrate sprintf function in C language. If you have any questions, do feel free to comment.

Output: LearnCOnline.com is a great site Also See: Explanation on sprintf function

sscanf function Demo 1

sscanf function Demo

Understand how sscanf function works in C programming language with the help of an example. Here we demonstrate sscanf function in C language. If you have any questions, do feel free to comment.

Output: Learn C Online Also See: Explanation on sscanf function