Windows Programming Using C

The Role of a Message Box Often we are required to display certain results on the screen during the course of execution of a program. We do this to ascertain whether we are getting the results as per our expectations. In a sequential DOS based program we can easily achieve this using printf( ) statements. … Read more

The First Windows Program in C

To keep things simple we would begin with a program that merely displays a “Hello” message in a message box. Here is the program… Naturally a question would come to your mind—how do I create and run this program and what output does it produce. Firstly take a look at the output that it produces. … Read more

Windows Programming Model

From the perspective of the user the shift from MS-DOS to Windows OS involves switching over to a Graphical User Interface from the typical Text Interface that MS-DOS offers. Another change that the user may feel and appreciate is the ability of Windows OS to execute several programs simultaneously, switching effortlessly from one to another … Read more

DOS Programming Model in C

DOS Programming Model in C

Typical 16-bit environments like DOS use a sequential programming model. In this model programs are executed from top to bottom in an orderly fashion. The path along which the control flows from start to finish may vary during each execution depending on the input that the program receives or the conditions under which it is … Read more

Memory Management in C

Memory Management in C

Since users have become more demanding, modern day applications have to contend with these demands and provide several features in them. To add to this, under Windows several such applications run in memory simultaneously. The maximum allowable memory—1 MB—that was used in 16-bit environment was just too small for this. Hence Windows had to evolve … Read more

C Under Windows

To a common user the differences amongst various versions of Windows like Windows 95,98, ME, NT, 2000, XP, Server 2003 is limited to only visual appearances—things like color of the title bar, shape of the buttons, desktop, task bar, programs menu etc. But the truth is much farther than that. Architecturally there are huge differences … Read more

I/O Redirection in C

Most operating systems incorporate a powerful feature that allows a program to read and write files, even when such a capability has not been incorporated in the program. This is done through a process called ‘redirection’. Normally a C program receives its input from the standard input device, which is assumed to be the keyboard, … Read more

Standard I/O Devices in C

Standard I/O Devices To perform reading or writing operations on a file we need to use the function fopen( ), which sets up a file pointer to refer to this file. Most OSs also predefine pointers for three standard files. To access these pointers we need not use fopen( ). These standard file pointers are … Read more