Program to find the day of the week for a given date
1.0 Day of Week The Gregorian calendar was adopted in 1582. The formula to find the day of the week for any date after 1582 is, d = N +…
1.0 Day of Week The Gregorian calendar was adopted in 1582. The formula to find the day of the week for any date after 1582 is, d = N +…
1.0 Structures A structure, in the C programming language, is a collection of variables for an entity. The variables are known as members of the structure and are located at…
1.0 Introduction A pointer variable holds the address of another variable. It is said to be "pointing" to that variable. For example, int *ip; defines a variable ip of type…
1.0 Introduction A C program comprises of global data and functions. A program must have a main function and the execution starts at the first statement in the main function.…
1.0 Introduction Data is an important part of a program. In fact, programs are written so that data can be captured, processed, stored and presented to the user. The success…
1.0 Introduction C is a procedural programming language invented by Dennis Ritchie in 1972. C is, possibly, the most widely used programming language in the last fifty years. There are…
The problem of removing leading and trailing whitespace characters in strings occurs in programming quite often. Here is a solution. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> void trim…
1.0 Queue A queue is something we see often in our daily lives. People stand in a queue to get into a bus, to get food in a buffet, buy…
While running a GTK+ based C program under Cygwin, the following runtime error is observed, Gtk-WARNING **: cannot open display: SOLUTION Make sure that Cygwin/XServer is installed and is running.…
A C program was compiled under Cygwin and run directly under Windows. The following runtime error was observed, cygwin1.dll not found SOLUTION Make sure that the environment variable, PATH, has…