Chapter 1: Programming in C

Program 1.1, page no. 6

In [1]:
print "Hello world!"
Hello world!

Program 1.2, page no. 7

In [2]:
print "\"If at first you don't succeed, try, try, try again!\""
"If at first you don't succeed, try, try, try again!"

Program 1.3, page no. 8

In [3]:
print "Beware the Ides of March!"
Beware the Ides of March!

program 1.4, page no. 14

In [4]:
print "My formula for success?\nRise early, work late, strike oil.\n"
My formula for success?
Rise early, work late, strike oil.

Program 1.5, page no. 14

In [5]:
print "\"It is a wise father that knows his own child.\"\nShakespeare\n"
"It is a wise father that knows his own child."
Shakespeare

Program 1.6, page no. 15

In [6]:
print "Be careful!!\n \a"
Be careful!!
 

Program 1.7, page no. 20

In [7]:
print "Hi there!\nThis program is a bit longer than the others."
print "But really it's only more text.\n\a\a"
print "Hey, wait a minute!! What was that???\n"
print "\t1.\tA bird?"
print "\t2.\tA plane?"
print "\t3.\tA control character?"
print "\t\t\b\bAnd how will this look when it print's out?"
Hi there!
This program is a bit longer than the others.
But really it's only more text.

Hey, wait a minute!! What was that???

	1.	A bird?
	2.	A plane?
	3.	A control character?
		And how will this look when it print's out?