“I bought this guide a few days ago to prepare for my interview with Oracle. Many of the questions they asked me were from this guide. I found this book absolutely great!”
chicken is a class which has some attributes:
- no of eggs: int
- hair color: enum
And also has some methods:
public Sound cocks()
public walk()
public eat()
etc
A keyboard is placed in front of the cage. Every time a key is pecked a seed will eject. Initially, code will not compile.
However, if an infinite number of chickens peck away at the keyboards for an infinite amount of time, it is theorized that eventually the random pecking will produce an algorithm to finally prove which came first….
CHICKEN is a compiler for the Scheme programming language. CHICKEN produces portable, efficient C, supports almost all of the current Scheme language standard, R5RS and includes many enhancements and extensions. CHICKEN runs on MacOS X, Windows, and many Unix flavours.
FEATURES
1. Includes a full-featured interactive interpreter as well as an optimizing batch compiler.
2.Full support for tail recursion, first-class continuations and high-level macros.
3. Highly portable and known to run on many platforms, including x86, x86-64, IA-64, PowerPC, SPARC and UltraSPARC, Alpha, MIPS, PA-RISC, ARM and S/390
4. Distributed free for use and modification under the terms of the BSD License
5. A sophisticated but easy to use foreign function interface for accessing C and C++ libraries from Scheme code
6.Lightweight threads based on first-class continuations
7.An object system with multiple dispatch, multiple inheritance and meta-object protocol
8. Provides the syntax-case enhanced high-level macro system (including R5RS syntax-rules), and define-macro style low-level macros
9. Support for syntactic pattern-matching via Andrew Wright’s match package
10. Execution profiling, debugging, backtrace and single-stepping support
11. A POSIX interface that covers environment and filesystem access, pipes, processes, signals, locks, sockets, and low-level and memory-mapped I/O
12. Support for interpreted or compiled shell scripts under Unix and Windows
13. CHICKEN is supported by SWIG so interfacing to C or C++ can be automated
14. Support for a large number of Scheme Requests For Implementation (SRFIs)
15.Transparent support for dynamically loadable compiled code and linkage to C
16. Perl compatible regular expressions
17. Many libraries and extensions are available at “Eggs unlimited”
chicken is a function which takes argument as grain type and returns egg.
egg chicken(grain x);
chicken is a class which has some attributes:
- no of eggs: int
- hair color: enum
And also has some methods:
public Sound cocks()
public walk()
public eat()
etc
class Road { /* … */ };
class Bridge { /* … */ };
template
class Chicken
{
public:
static void do_cross() { };
};
template
class Chicken
{
// prevent chicken at compile-time from crossing the f…ing road
};
Very intelligent and technically sound answer given.Even a person with no knowledge of programming can also understand whats a function actually does?
A keyboard is placed in front of the cage. Every time a key is pecked a seed will eject. Initially, code will not compile.
However, if an infinite number of chickens peck away at the keyboards for an infinite amount of time, it is theorized that eventually the random pecking will produce an algorithm to finally prove which came first….
class Chicken: public Bird
{
public:
char* LatinName() { return “Gallus gallus”; }
char* Name()
{
Language lang = GetUserLanguage();
return Translation(LatinName(),lang);
}
bool isDomesticated () { return true; }
int Population (int year)
{
int pop = AnimalPopulationDatabase.Querey(LatinName(),year);
if (pop==0) pop = 24000000000;
return pop;
}
int MaxLifeSpan() { return 11; }
int MinLifeSpan() { return 4; };
int ActualLife ()
{
if (isRasiedForEgg())
{
return 2.5;
}
else // for meat
{
if (IsCaged()) return 0.5;
else return 1.2;
}
}
…
}
class Chicken:public Bird
{
float weight,height,age;
enum color=(LIGHTYELLOW,DARKYELLOW,ORANGE,DEEPORANGE);
Bird parent;
bool gender;
public:
Chicken(float w=5.0,float h=0.5,float a=1.0,Bird p,bool g)
{
weight=w;
height=h;
age=a;
parent=p;
gender=g;
}
//ALL GETS AND SETS
//functions like
//LayEggs,Walk,Talk,Eat,Sleep,NCalls…
//Most of them virtual in Bird class
::chicken is a function which takes argument as grain type and returns egg.
::egg chicken(grain x);
I beg to differ…..
Chicken is a function which takes an argument as grain type and returns chicken shyt.
typedef unsigned int uint;
class chicken:public bird
{
bool sex;
uint age;
uint no_eggs;
state_t state;
public:
bird(bool sx=MALE, uint ag=0, uint no_eggs=0, state_t st=F_CKING);
bool shit();
bool crossTheRoad();
uint getEggs();
bool f_ck();
void eat();
void die();
bool sleep();
~bird();
};
OR
class chicken:public ________
{
int _;
bool __;
float ___;
public:
chicken():_(8),__(0),___(8);
int ____(){ in##t i_n_t_=’__’; }
bool _____(); {bool b_o_o_l=(bo##ol)(’:)’)}
float _______();{float f_l_o_a_t=(flo##at)(’;)’)}
};
Simple, isn’t it?
It’s a trick question — chickens can’t program.
CHICKEN is a compiler for the Scheme programming language. CHICKEN produces portable, efficient C, supports almost all of the current Scheme language standard, R5RS and includes many enhancements and extensions. CHICKEN runs on MacOS X, Windows, and many Unix flavours.
FEATURES
1. Includes a full-featured interactive interpreter as well as an optimizing batch compiler.
2.Full support for tail recursion, first-class continuations and high-level macros.
3. Highly portable and known to run on many platforms, including x86, x86-64, IA-64, PowerPC, SPARC and UltraSPARC, Alpha, MIPS, PA-RISC, ARM and S/390
4. Distributed free for use and modification under the terms of the BSD License
5. A sophisticated but easy to use foreign function interface for accessing C and C++ libraries from Scheme code
6.Lightweight threads based on first-class continuations
7.An object system with multiple dispatch, multiple inheritance and meta-object protocol
8. Provides the syntax-case enhanced high-level macro system (including R5RS syntax-rules), and define-macro style low-level macros
9. Support for syntactic pattern-matching via Andrew Wright’s match package
10. Execution profiling, debugging, backtrace and single-stepping support
11. A POSIX interface that covers environment and filesystem access, pipes, processes, signals, locks, sockets, and low-level and memory-mapped I/O
12. Support for interpreted or compiled shell scripts under Unix and Windows
13. CHICKEN is supported by SWIG so interfacing to C or C++ can be automated
14. Support for a large number of Scheme Requests For Implementation (SRFIs)
15.Transparent support for dynamically loadable compiled code and linkage to C
16. Perl compatible regular expressions
17. Many libraries and extensions are available at “Eggs unlimited”
Leave an Answer/Comment