---------- Forwarded message ----------
From:
manoj.w...@tcs.comTo:
sand...@yahoo.co.in,
prad...@yahoo.co.in,
yso...@gmail.comDate: Fri, 15 Sep 2006 19:45:53 +0530
Subject: Fundoo C questions
1. Write a C function that will print 1 to N one per each line on the stdout
where N is a int parameter to the function. The function should not use
while, for, do-while loops, goto statement, recursion, and switch
statement.
2.
What's the "condition" so that the following code
snippet prints both HelloWorld !
if "condition"
printf ("Hello");
else
printf("World");
3. Write a small C program, which while compiling takes another program
from input terminal, and on running gives the result for the second
program. (NOTE: The key is, think UNIX).
Suppose, the program is 1.c
Then, while compiling
$ cc -o 1 1.c
int main()
{
printf("Hello World\n");
}
^D
$ ./1
Hello World
$
Manojkumar Machindra Waghmare
Tata Consultancy Services Limited
Mailto:
manoj.w...@tcs.com
Website: http://www.tcs.com=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you