C++ General Interview Questions
Questions Answers Views Company eMail

write a c++ program that gives output 4 3 4 2 3 4 1 2 3 4 using looping statement

4 12191

A milk carton can hold 3.78 litres of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one litre of milk is $0.38, and the profit of each carton of milk is $0.27. Write a C++ program that prompts the user to enter the total amount of milk produced in the morning. Then display the number of milk cartons needed to hold milk, the cost of producing milk, and the profit for producing milk.

2 27692

i have given a project to create examination seating plan system in c++. so can anyone send me the answer of this question quickly??????

1 6486

what is object?

7 6096

write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.

2226

In java a final class is a class that cannot be derived. How can you make a similar class in C++

1 3289

if int1 has the value 12, int has the value 18, and int3 has the value 21, what is the result: int1 < int2 && int2 < int 3

3 6922

write a program to add two numbers without using an arithmetic operator.

NIIT,

1 3911

write a program that withdrawals,deposits,balance check,shows mini statement. (using functions,pointers and arrays)

1783

can any one help to find a specific string between html tags which is changed to a sting.. weather.html looks (for location) is somewhere #include #include #include using namespace std; string find_field(string myPage,string); int main (void) { string page, line, location, temperature; ifstream inputFile("weather.xml"); while(getline(inputFile, line)) { page.append(line); line.erase(); } // Now page is a string that contains the whole xml page // Here you need to write something that finds and // extracts location and temperature from the XML // data in the string page and stores them in // the strings location and temperature respectively location=find_field(page,"location"); temperature=find_field(page,"temp_c"); cout << "Location: "< 1621


I need to find a specific string between two strings how do I do it?

Infosys,

1 3284

How would you represent an error detected during constructor of an object?

1 2621

why and when we can declar member fuction as a private in the class?

1575

class base { public: int fun(int) {} }; class base2 { public: int fun(float) { } }; so here qustion is both function either function overloading or over riding;

Manhattan,

4 5180

write a C++ programming using for loop: * * * * * * * * * *

TCS,

4 5698


Post New C++ General Questions

Un-Answered Questions { C++ General }

Explain the problem with overriding functions

582


Which bit wise operator is suitable for turning off a particular bit in a number?

618


Give an example of run-time polymorphism/virtual functions.

541


How many namespaces are there in c++?

537


What do you mean by “this” pointer?

588






Explain the difference between struct and class in terms of access modifier.

661


What is a constructor in c++ with example?

562


How do you sort a sort function in c++ to sort in descending order?

534


What is srand c++?

543


What is #include iostream?

711


What does ctime() do?

592


How to demonstrate the use of a variable?

619


What is setiosflags c++?

512


What are static and dynamic type checking?

587


What are friend functions in C++?

600