write a program that reverses the input number of
n.Formulate an equation to come up with the answer.


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ Code Interview Questions

write a program that calculate the volume of cylinder after user enters radius and height and show the algorithm used

1 Answers   Jomo Kenyatta University,


write a function – oriented program that calculates the sum of the squares from 1 to n. thus, if the input is 3, the output is 14

3 Answers  


Perform the functionality of 2-D array through 1-D array and in it the functions to be performed were: (1) Display the array in 2-D format (2) Display a particular element (3) Display a particular row (4) Display a particular column

1 Answers   Nagarro,


Show by induction that 2n > n2, for all n > 4.

2 Answers   Karvy, Qatar University,


Complexity T(n) 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 = c*n?.)

1 Answers   Qatar University,






Write a simple encryption program using string function which apply the substitution method.

0 Answers  


What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }

0 Answers  


void main() { int i,j=2; for(i=0;i<3;i++) if(j=i) cout<<"Lotus "; else cout<<"Rose "; } Its result is Rose Lotus Lotus.. How? Explain it?

2 Answers  


#include<iostream.h> //main() //{ class A { friend class B; public: void read(); }; class B { public : int a,b; }; void A::read() { cout<<"welcome"; } main() { A x; B y; y.read(); } In the above program......, as B is a friend of A B can have access to all members,i cant access y.read . could you please tell me the reason and what would i code to execute this program?

2 Answers  


find level of following tree (state, parent) " J,D I,D H,C E,B F,B G,C B,A D,A C,A A,& K,E L,E L,F M,F N,G O,H P,I P,H Q,I R,J S,K U,P T,L

0 Answers  


write a program that prompt the user to enter his height and weight,then calculate the body mass index and show the algorithm used

0 Answers   Jomo Kenyatta University,


Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60

1 Answers  


Categories