U hv to enter a range from a and b and search hw many no.
of times a pattern n. occurs between the range a and b.
Eg :i/p:enter range :0 100
Enter pattern: 13
o/p: the no. times 13 occurred betwwn 0 to 100:1

Eg :i/p:enter range :100 1000
Enter pattern: 13
o/p: the no. times 13 occurred betwwn 100 to 1000:
(in this 13,113,131,132,133…139,213,313,…913 all these will
be counted)


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

Post New Answer

More C++ Code Interview Questions

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.

2 Answers  


A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE OUTPUT: E

1 Answers  


how to diplay a external image of output on winxp by using c & c++,

0 Answers  


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  


Code for Method of Handling Factorials of Any Size?

0 Answers  






what is virtual constroctor ? give an exam for it?-(parimal dhimmar)

2 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  


Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37

0 Answers   Nagarro,


Algorithm in O(2n) Presently we can solve in our hypothetical machine problem instances of size 100 in 1 minute using algorithm A, which is a O(2n). We would like to solve instances of size 200 in 1 minute using algorithm A on a new machine. What is the speed of the new machine should be?

2 Answers   ABC, Qatar University,


Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

2 Answers   TCS,


Min-Max Write an algorithm that finds both the smallest and largest numbers in a list of n numbers and calculate its complexity T(n).

1 Answers   Infosys, Qatar University,


what is the difference between int &r and int& r

3 Answers  


Categories