There is a 100-story building and you are given two eggs. The eggs (and the building) have an interesting property that if you throw the egg from a floor number less than X, it will not break. And it will always brake if the floor number is equal or greater than X. Assuming that you can reuse the eggs which didn't broke; you got to find X in a minimal number of throws. Give an algorithm to find X in minimal number of throws.
5 23269Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?
1 9590Given an array of characters which form a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it?
3 8056Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
HCL,
2311what is diff between localstatic and globalstatis variable possible 2 use in another file...?
HCL,
2 5445in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
IBM,
11 35174Would you rather wait for the results of a quicksort, a linear search, or a bubble sort on a 200000 element array? 1) Quicksort 2) Linear Search 3) Bubble Sort
3 6562
What is the use of printf() and scanf() functions?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply
Why can’t constant values be used to define an array’s initial size?
Why pointers are used in c?
What functions are used in dynamic memory allocation in c?
What is far pointer in c?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
Differentiate between a for loop and a while loop? What are it uses?
What is the explanation for modular programming?
How can you tell whether two strings are the same?
What are control structures? What are the different types?
how many errors in c explain deply
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
What is main return c?
What are the two types of functions in c?