#define

What does the following code print?

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
int kitty(int a, int b)
{
    int c;
    c=(2-a/b)*2;
    return c;
}
void main ()
{
    int a=6; b=4;
    cout<<kitty(a,b);
}


The answer is 2.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Integer Division!

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...