Computer Sciences > Gate 2016 Set-1 > Functions
A function f : N+ → N+, defined on the set of positive integers N+, satisfies the following
properties:
f(n) = f(n/2) if nis even
f(n) = f(n+5) if nis odd
Let R = {i|∃ j : f(j) = i} be the set of distinct values that f takes. The maximum possible size of R is .
properties:
f(n) = f(n/2) if nis even
f(n) = f(n+5) if nis odd
Let R = {i|∃ j : f(j) = i} be the set of distinct values that f takes. The maximum possible size of R is .
Correct : a
Similar Questions
The following function computes the maximum value contained in an integer array p[] of size n (n >= 1)
int max(int *p, int n)
{
int a=0, b=n...
Consider the following C program.
void f(int, short);
void main()
{
int i = 100;
short s = 12;
short *p = &s;
&...
Consider the following function implemented in C:
void printxy(int x, int y)
{
int *ptr;
x = 0;
ptr = &x;...
Total Unique Visitors
Loading......