C Programming

home previous next

CLASS EXERCISE C1
What will the following program output?


	#include <stdio.h>

	main()
	{
		printf("Programming in C is easy.\n");
		printf("And so is Pascal.\n");
	}


And this program?


	#include <stdio.h>

	main()
	{
		printf("The black dog was big. ");
		printf("The cow jumped over the moon.\n");
	}


Another thing about programming in C is that it is not necessary to repeatedly call the printf routine, so try and work out what the following program displays,


	#include <stdio.h>

	main()
	{
		printf("Hello...\n..oh my\n...when do i stop?\n");
	}

Answers


ęCopyright B Brown. 1984-1999. All rights reserved.
home previous next