25. It takes five minutes to pass a rumour from one
person to two other persons. The tree of rumour continues.
Find how many minutes does it take spread the rumour to 768
persons. ?

Answer Posted / pradeep

// It's a combination of 1+2+4+8+16+.... and each intervl
takes 5 minutes.
so use the below logic to find out the ryt answer

int time;
for ( int i=0,sum=0;sum<=768;i++)
{
sum = sum+(2*i);
time = 5*i;
}
printf("time in min %d \r\n"),time);

correct answer is 140 minutes [ nothng but 2 hours 20 min]

return TRUE;

Is This Answer Correct ?    4 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Array is an lvalue or not?

622


Explain what is meant by 'bit masking'?

634


Which header file should you include if you are to develop a function which can accept variable number of arguments?

795


Explain how can type-insensitive macros be created?

564


Differentiate between #include<...> and #include '...'

609






What is pass by reference in c?

600


What is methods in c?

630


A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?

1760


Why we use break in c?

536


write a program to concatenation the string using switch case?

1547


What do you mean by dynamic memory allocation in c?

637


Why pointers are used in c?

576


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

636


What is substring in c?

626


What is nested structure?

562