C program to Change the Text Background Color

C program to Change the Text Background Color

C program to Change the Text Background Color Few important points regarding this program are: SetConsoleTextAttribute: Sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function. This function affects text written after the function call. Syntax: BOOL WINAPI SetConsoleTextAttribute(_In_ HANDLE hConsoleOutput , _In_ WORD wAttributes); Below is the … Read more

C Program to create a Menu Driven software using Switch Case

switch case flow chart

C Program to create a Menu Driven software using Switch Case #include<stdio.h> int main() { printf(“\n\n\t\tMenu driven program in c\n\n\n”); int choice, num, i; unsigned long int fact; while(1) { printf(“1. Factorial \n”); printf(“2. Prime\n”); printf(“3. Odd\\Even\n”); printf(“4. Exit\n\n\n”); printf(“Enter your choice : “); scanf(“%d”,&choice); switch(choice) { case 1: printf(“Enter number:\n”); scanf(“%d”, &num); fact = … Read more

C Program to Shutdown Linux OS

shutdown program in c

C Program to Shutdown Linux OS In this program : You need to be logged in as user for above program to execute otherwise you will get the message shutdown: “Need to be root”. ‘-P’ option specifies you want to power off your machine. You can specify minutes as: shutdown -P “number of minutes” Let see the below program #include<stdio.h> #include<stdlib.h> … Read more

Open Source

Open source is a concept often associated with Linux and free software. Linux is an open source project, which means that its source code is available for anyone to see. That’s different from, say, Microsoft’s development model, which is closed source. Microsoft’s source code is not widely available, and if you’re granted access to it … Read more

The Linux Diaspora

For a Linux newbie, one of the most disorienting aspects is: why are there so many versions? You just want to use Linux, but which one? Linux itself seems to be nowhere—all there are to be found are distributions. That is quite true, but the real question you should be asking yourself is: what do … Read more

RMS on Free Software

Speaking out against the practice of proprietary and closed software was an MIT Lab programmer called Richard Matthew Stallman, or RMS as he prefers to be called. Working at MIT labs, several episodes warned him about how proprietary and closed software was imposing severe limits to their users’ freedoms. He believed that users should be … Read more