C++ General Interview Questions
Questions Answers Views Company eMail

How much is size of struct having 1 char & 1 integer?

Persistent,

11 13339

They will ask u question about single linked list?. Write Code for to insert delete node.

Persistent,

2 4940

if there is binary tree which one is the easiest way to delete all child node?

Persistent,

1 5288

Write a C program to calculate the salary of each employee in your company. You need to input the hours worked and the hourly rate. The company pays 1.5 times the hourly rate for all hours worked in excess of 48 hours. Use the formulas below to calculate the salary: if employee worked less than 48 hours salary = hours * rate; if employee worked more than 48 hours salary = 48.0 * rate + ( hours − 48.0 ) * rate * 1.5; You are required to use a loop to produce the sample output as given below.

1 12225

When is a template better solution than a base class??

emc2,

2 7665

Explain calling an object's member function(declared virtual)from its constructor?

1 2729

You're given an array containing both positive and negative integers and required to find the sub-array with the largest sum (O(N) a la KBL). Write a routine in C for the above.

4 11142

Given an array of size N in which every number is between 1 and N, determine if there are any duplicates in it. You are allowed to destroy the array if you like. [ I ended up giving about 4 or 5 different solutions for this, each supposedly better than the others ].

1 5037

Give a very good method to count the number of ones in a "n" (e.g. 32) bit number.

3 7474

What is the output of the following 3D Array int arr[3][2][2]={1,2,3,4,5,6,7,8,9,10,11,12}; what is the output for arr[2][1][0]?

HCL, Integra, IPMC, ORG,

6 40168

What are the advantages of C++ programming compared to C programming?

HAL,

2 4943

Adobe Interview & Adobe Placement Paper

Adobe,

1 10425

what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?

1741

What is volatile and pragma? When they are used?

1 3035

In which memory a class gets stored(in heap /in stack)? And why??

2 7985


Post New C++ General Questions

Un-Answered Questions { C++ General }

What is the use of volatile variable?

588


Do inline functions improve performance?

635


What is public, protected, private in c++?

640


Describe private, protected and public – the differences and give examples.

578


Do you need a main function in c++?

545






Do you know what are pure virtual functions?

636


Explain differences between alloc() and free()?

570


If a function doesn’t return a value, how do you declare the function?

604


What is the difference between object-oriented programming and procedural programming?

683


What is the difference between passing by reference and passing a reference?

547


How would you find out if a linked-list is a cycle or not?

536


what is oops and list its features in c++?

536


What is pointer with example?

552


Can we change the basic meaning of an operator in c++?

646


What is the difference between the functions memmove() and memcpy()?

619