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 23440Given an array of characters, how would you reverse it? How would you reverse it without using indexing in the array?
1 9675Given 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 8162Write 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,
2357what is diff between localstatic and globalstatis variable possible 2 use in another file...?
HCL,
2 5546in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?
IBM,
11 35596Would 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 6684
Find duplicates in a file containing 6 digit number (like uid) in O (n) time.
How are 16- and 32-bit numbers stored?
Who developed c language?
which of the following statement is wrong a) mes=123.56; b) con='T'*'A'; c) this='T'*20; d) 3+a=b;
What is the difference between fread and fwrite function?
What is the purpose of the statement: strcat (S2, S1)?
What are the three constants used in c?
List the difference between a While & Do While loops?
What is character constants?
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
What is c programming structure?
Why clrscr is used in c?
Is it valid to address one element beyond the end of an array?
Which programming language is best for getting job 2020?
What is c language and why we use it?