CIS 1.5

Professor Y. Langsam

 

Homework 0

 

Due: ________________

 

 

Type the following program exactly as is written. Compile and execute it. Turn in both the source code and the resulting output.

 

 

 

/*

  Name: your name goes here

  Author: your name goes here

  Date: 23/01/06 23:18

  Description: This is my first program and is to be handed in

*/

 

 

#include <stdio.h>

#include <stdlib.h>

int main()

{

     char first[10], last[10];

 

     printf("Please enter your first and last name.\n");

     printf("Do not forget to press the ENTER key!\n\n");

 

     scanf("%s%s", first, last);

 

     printf("\nThis is my first program!\n");

     printf("My name is: %s %s\n", first, last);

   

system("PAUSE");   

return 0;

} /* end main */