C
Clark S. Cox III
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Regards
MA
#include <stdio.h>
int main(void)
{
printf("1 to n\n");
return 0;
}
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Regards
MA
Le 22-12-2006 said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Regards
MA#
jd said:recusion?
void foo(int a, b) {
if(a=b) then return
else {
printf("%d\n", a);
foo(a+1, b);
}
}
jd said:Whoops. Too hasty, == for equality, include stdio.h etc..
jd said:Bah! It gets worse! No 'then' obviously. Guess who has to program in
Delphi at the moment?
Yahooooooooo said:no gotos
no loops
how is it possbile.....
no gotos
no loops
how is it possbile.....
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Regards
MA
SORRY forgot to metion....
No recursion also![]()
Not real recursion, but template recursion:
Not real recursion, but template recursion:
<code>
#include <iostream>
template <int M,int MAX> struct whatever {
Yahooooooooo said:SORRY forgot to metion....
No recursion also![]()
SORRY forgot to metion....
No recursion also![]()
2006-12-22 said:AAARRRGHH! And it only prints up to N-1 too. Should have been a>b.
I promise I'll never post again to clc.
Marc said:pre-processor recursion also.
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
No recursion also
Yahooooooooo said:no gotos
no loops
how is it possbile.....
Asked in interview ...
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.