C++ Code Interview Questions
Questions Answers Views Company eMail

write a program that can LOCATE and INSERT elements in array using c++ programming languages.

3435

write a program that can locate elements in array.

1 5041

can you please write a program for deadlock that can detect deadlock and to prevent deadlock.

2744

what is the diffrence between ++x , x++ pleaaaaase ???

7 14588

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

2008

Here's the programm code: int magic(int a, int b) { return b == 0 ? a : magic(b, a % b); } int main() { int a, b; scanf("%d%d", &a, &b); printf("%d\n", magic(a, b)); return 0; } on input stream we have integers 4, 45 What's the output integer? How many times will be initiated "magic" function?

1 3319

1. Write a program that performs the following. The user inputs a number and then enters a series of numbers from 1 to that number. Your program should determine which number (or numbers) is missing or duplicated in the series, if any. For example, if the user entered 5 as the initial number and then entered the following sequences, the results should be as shown. Input Sequence Output ---------------------- --------------- 1 2 3 4 5 Nothing bad However, if 7 were the high number, the user would see the results on the right for the following number entries: Input Sequence Output ---------------------- --------------- 1 3 2 4 5 Missing 6 Missing 7 And if 10 were the high number and the user entered the numbers shown on the left, note the list of missing and duplicate numbers: Input Sequence Output ---------------------- --------------- 1 2 4 7 4 4 5 10 8 2 6 Duplicate 2 ( 2 times) Missing 3 Duplicate 4 ( 3 times ) Missing 9

1 12155

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.

ADP, Amazon, HCL, IBM, Infosys, Satyam, TCS, Vimukti Technologies,

5 15006

Write an algorithm that receives a string and reverses it.

2 4811

What will be the output- for(i=1;i<=3;i++) { printf("%d",i); continue; i++; }

Impetus,

5 18503

write a program that accepts a number and outputs its equivalent in words. take note that the maximum input is 3000

Alvin,

1 15808

swap prog

TCS,

3 5152

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.

TCS, Vimukti Technologies, Wipro,

3 8913

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.

3 8226

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 13408


Post New C++ Code Questions

Un-Answered Questions { C++ Code }

Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?

7336


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

2008


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3955


Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.

2149


Teta-Omeg-Big-Oh Show that f(n) = n2 + 3n3 is ;(n3).

3189






i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.

1968


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

2936


write a program that reads a series of strings and prints only those strings begging with letter "b"

2672


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3365


Implement a command console for changing settings on a particular object. The command console should allow you to enter a string and will return the response (very similar to a terminal session). The commands are as follows: SET propertyname=newvalue will change the target object’s member named “propertyname” to have a value equal to “newvalue”. If the input value is incompatible (i.e. an int being set to a string), print out an appropriate error message. GET propertyname will print out the current value of the target object’s member named “propertyname”. GET * will print out a list of all target object members and their current values. The system should be extensible for future commands and should accept an arbitrary object, such that another developer could insert another object into the system and rely on the command console to get and set the properties correctly.

3395


write a program using virtual function to find the transposing of a square matrix?

2839


How to Split Strings with Regex in Managed C++ Applications?

3125


Code for Easily Using Hash Table?

2389


write a program that creates a sequenced array of numbers starting with 1 and alternately add 1 and then 2 to create the text number in the series , as shown below. 1,33,4,6,7,9,............147,148,150 Then , using a binary search , searches the array 100 times using randomly generated targets in the range of 1 to 150

3264


solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)

2932