C Program to delete a file using remove function.

Write a C program to delete a specified file using remove function. remove function deletes the specified file, where it takes file name as the argument and if file is successively deleted it returns 0 , other wise returns a non zero value. Read more about C Programming Language . and read the C Programming …

C program without using main function

Write a C program without using main function.In this program, we didn’t use the main function, but we are using the preprocessor directive #define with arguments to define the Main function.A Preprocessor is program which processes the source code before compilation.The ‘##‘ operator is called the token pasting or token merging operator. In the second …

C program to print given numbers as a pyramid

Write a C program to print given numbers as a pyramid.In this program we use the simple for statements to produce the patterns.This program prints the following output,        1      232    34543  4567654567898765 Read more about C Programming Language . and read the C Programming Language (2nd Edition). by K and …

C program to hide the mouse pointers.

C program to hide the mouse pointers.In this program, we hide the mouse pointers using graphics.h and dos.h library functions.To use graphics.h, we have to install the drivers in to the the system by using the initgraph() function.In this program,we also check the condition that mouse pointer is available or not. Read more about C …

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