C++ Interview Questions
Questions Answers Views Company eMail

1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individual digits and sum together you will get the same number. 2. A program that can accept as input an integer and output the equivalent of that number in words.

3 5247

Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D

1 3039

IN PROGRAMING LANGAUGE A C++ IS PURELY OBJECT ORIENTED OR NOT?

2 3863

to find out the minimum of two integer number of two different classes using friend function

1635

officer say me - i am offered to a smoking , then what can you say

1572

write a programe to calculate the simple intrest and compund intrest using by function overlading

1657

give me an example for testing a program showing the test path .show how the test is important and complex.

TCS,

2416

Define a program that reads two matrices of size 3x3 with real values from the user then prints their sum, difference and multiplication.

TCS,

2576

#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2157

#include #include #include #include void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort

2056

#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3238

What is the difference between class and object?

Apple, Heinz,

4 5369

assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).

1660

what is compiler?

NASA,

4 4939

c++ program to swap the objects of two different classes

1752


Un-Answered Questions { C++ }

Is it possible to pass an object of the same class in place of object reference to the copy constructor?

562


What are "pure virtual" functions?

584


Why oops is important?

597


What is the use of oops?

612


What is wrapper class in c++?

620






What is endianness?

613


What is solid in oops?

592


What is #include math h in c++?

565


What is runtime errors c++?

562


What is c++ namespace?

703


What is meant by forward referencing and when should it be used?

544


Can we use this pointer inside static member function?

617


What are the three parts of a simple empty class?

1447


Can non graphic characters be used and processed in C++?

693


What are static and dynamic type checking?

602