| Other C++ Code Interview Questions |
|| Asked @
|Where now stands that small knot of villages known as the
Endians, a mighty forest once stood. Indeed, legand has it
that you could have stoodon the edge of the wood and seen
it stretch out for miles, were it not for the trees getting
in the way.
In one section of the forest, the trees stood in a row and
were of hight from 1 to n, each hight occurring once and
A tree was only visible if there were no higher trees
before it in the row.
For example, if the heights were 324165, the only visible
trees would have been those of height 3,4 & 6.
Write a Program that takes an array of integers
representing the heights of the trees in the row as input
and prints the list of the visible trees.
Write a linear-time algorithm that sorts n distinct
integers, each of which is between 1 and 500.
Hint: Use a 500-element array. (Linear-time means your
algorithm runs in time c*n + b, where c and b are any
constants that do not depend on n.
For example, your algorithm can run in time n, or time 2n +
1, or time 5n + 10, or time 100n + 6, but not time c*n*n =
|what is the diffrence between ++x , x++ pleaaaaase ???
|Write a program using one dimensional array that accept five
values from the keyboard. Then it should also accept a
number to search. This number is to be searched if it among
the five input values. If it is found, display the message
“Search number is found!” otherwise, display “Search is lost”.
Enter 5 numbers: 10 15 20 7 8
Enter number to search: 7
Search number is found!
4 5 6 7
8 9 10 11 12 13 14 15
|write a function -oriented program that generates the
Fibonacci, the current numbers of n(as input) and display
them (series). In Fibonacci, the current third number is the
sum of the previous number.
|Counting in Lojban, an artificial language developed over
the last fourty years, is easier than in most languages
The numbers from zero to nine are:
Larger numbers are created by gluing the digit togather.
For Examle 123 is pareci
Write a program that reads in a lojban string(representing
a no less than or equal to 1,000,000) and output it in
|1. Write a program using one dimensional array that
calculates the sum and average of the five input values from
the keyboard and prints the calculated sum and average.
|Write A C++ Program To Input A Number Between 20 To 99 And
Display Its Numbername?
|write a c program, using for loop, that accepts and odds two
numbers. The output must be the sum and the addens. This
should be repeated 5 times while the first number is
decremented by one and the second number is incremented by 1.
|Find the maximum product of three numbers in an array?
Max product= 9*5*3= 135
The array can hav negative numbers also..
|Write a function- oriented to convert the input dollar(s)
into its equivalent peso. Assume that one dollar is
equivalent to 51.60
|For more C++ Code Interview Questions Click Here |