C Program to change the text colors.

Write a C Program to change the text colors.In this program, we give the example of changing the text colors, background colors using conio.h library.Syntax: void textcolor(int_color);Here color is the integer variable, you can specify a color name also, but it should be a proper color name in capital letters.Read more about C Programming Language …

C program to sort a string

C Strings: Write a C program to sort a string. In this program we sort the string using bubble sort technique. Bubble Sort is the simplest and easiest sorting technique. In this technique, the two successive items A[i] and A[i+1] are exchanged whenever A[i]>=A[i+1]. The larger values sink to the bottom of the array and …

Write a C program to reverse a string using pointers.

C Strings:Write a C program to reverse a string using pointers.In this program, we reverse the given string by using the pointers. Here we use the two pointers to reverse the string, strptr holds the address of given string and in loop revptr holds the address of the reversed string. Read more about C Programming …

C Aptitude Questions and answers with explanation

C Aptitude 19C program is one of most popular programming language which is used for core level of coding across the board. C program is used for operating systems, embedded systems, system engineering, word processors,hard ware drivers, etc. In this site, we have discussed various type of C programs till date and from now on, …

C Aptitude Questions and answers with explanation

C Aptitude 16C program is one of most popular programming language which is used for core level of coding across the board. C program is used for operating systems, embedded systems, system engineering, word processors,hard ware drivers, etc. In this site, we have discussed various type of C programs till date and from now on, …

C Program to lock file using semaphores.

Write a C Program to lock file using semaphores.Using semaphores, We can control access to files, shared memory and other things. The basic functionality of a semaphore is that you can either set it, check it, or wait until it clears then set it (“test-n-set”). In C semaphores functions defined in the sys/sem library. Read …

C program to Encrypt and Decrypt a password

C Strings:Write a C program to Encryption and Decryption of password.In this program we encrypt the given string by subtracting the hex value from it. Password encryption is required for the security reason, You can use so many functions like hash or other keys to encrypt. Read more about C Programming Language . and read …

C Program to solve the producer consumer problem

Write a C Program to solve the producer consumer problem with two processes using semaphores.Producer-consumer problem is the standard example of multiple process synchronization problem. The problem occurs when concurrently producer and consumer tries to fill the data and pick the data when it is full or empty. producer consumer problem is also known as …

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 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 …