_______________________________________________________________________________________________
 
The following steps demonstrate how to log on, create and execute an example C program using the VAX
software editor.

Step 1: Log on to your tigerLAN account as per instructions below

 
Step 2 : Log on to your VAX acccount as per instructions below  
Step 3 : Create a example C program file using the VAX editor as per instructions below  ed example1.c

 Step 4: Writing the C program.

Note the following about C programs :

 
/* File name: example1.c */
/* sample C program to print out a name */

 #include <stdio.h>          /* necessary so that input – output statements can be used*/
main()                             /* necessary :every C program begins executing after main */

 {                                   /* necessary: starts the main block */
char name[50];

 printf("\n\n------------------------------------\n");

printf("Enter your name :");

gets(name);

printf("Your name is %s", name);

}                                     /* necessary : ends the main block */

 
Step 5: Save the program

 23 lines written to file Q820I:[YOUR USER NAME]EXAMPLE1.C;1

 
Step 6: Compile the program

        cc example1.c
 
Step 7 : Link Sthe program                              link example1

 Step 8: Execute the program

                            run example1

 To Tutorial Index