| Other C++ Code Interview Questions |
| |
| Question |
Asked @ |
Answers |
| |
| Write an algorithm that receives a string and reverses it. |
| 2 |
| . Write a program using two-dimensional arrays that computes
the sum of data in tows and the sum of data in columns of
the 3x3 (three by three) array variable n[3][3].
|
IBM | 2 |
| . Remove all the blank spaces between
character.Matrix is of 10* 10.
eg: INPUT
------------------------------------
| N | A | | V | |T
-------------------------------------
| |G | U | |P |
--------------------------------------
|T | | | A | |
------------------------------------
OUTPUT:
------------------------------------
| N | A | V | T | |
-------------------------------------
|G |U | P | | |
--------------------------------------
|T | A | | | |
------------------------------------
|
Nagarro | 2 |
| Given 1 to n random number, find top 10 maximum numbers and
explain the time complexity of the algorithm. |
NetApp | 1 |
| what is virtual constroctor ? give an exam for it?-(parimal
dhimmar) |
| 2 |
| 1.program to add any two objects using operator overloading
2.program to add any two objects using constructors
3.program to add any two objects using binary operator
4.program to add any two objects using unary operator |
IBM | 2 |
| Min-Max
Write an algorithm that finds both the smallest and
largest numbers in a list of n numbers and with complexity
T(n) is at most about (1.5)n comparisons. |
Qatar-University | 9 |
| #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 |
| Display Pattern:
1
2 3
4 5 6 7
8 9 10 11 12 13 14 15
…
|
| 2 |
| What will be the output-
for(i=1;i<=3;i++)
{
printf("%d",i);
continue;
i++;
} |
Impetus | 4 |
| hello friends, given an expression we have to remove the
unwanted brackets in that expression.
Eg : (a+b) ---> a+b
(a+b)*(c)-----> (a+b)*c. Please mail me if you know
the logic. My mail id is : saravana6m@gmail.com.
Thank you in advance :-) |
Microsoft | 1 |
| Write a program using two-dimensional arrays that determines
the highest and lowest of the 12 input values.
Example:
Enter 12 numbers:
13 15 20 13 35 40 16 18 20 18 20 14
highest: 40
lowest: 13
|
| 1 |
| |
| For more C++ Code Interview Questions Click Here |