On 3 Feb 2004 12:22:57 -0800, the right honourable
hie..
Do any one knows how to write a C program without using the
conditional statements if, for, while, do, switch, goto and even
condotional statements ? It would be a great help for me if someone
helps me...
Urgent - Please reply soon !
Thanks, Raghu
25 years ago, I started work for a company. As I had written a program
in Fortran before, I was immediately labelled as King OneEye in that
country of blinds.
They had a "computer" to run a program for the calculation of certain
standard constructions.
I looked into the program and saw that the programmer did not
understand and use the idea of a loop counter.
He wrote a routine 10 times to process 10 similar parts of the
construction.
I introduced looping then, and brought the size of the program back to
3, instead of 9 magnetic cards (the machine was a Canon Canola
programmable tabletop machine).
Man, was I **KING** in the eyes of management !
As for conditionals, I suspect you cannot write a sensible program
without it, because taking decisions is the very raison d'etre of the
computer, is it not ?
Would even "hello World" have no looping or conditionals, if looked at
at the underlying machine code level ? C hides those , true...
But that is off-topic.
Anyway, I have the uneasy feeling, the OP is teasing his readers.
The answer being so obvious, and the kind of program resulting so ....
weird, useless, not done ?
frgr
Erik