Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

problem 1)a) prepare the output for the following program code:

# include
void divide(int x, int y){
cout<<”\n Inside function”;
try{
if(y= = 0)
throw y;
else
cout<<”\nDivision=”<} catch(int) {
cout<<”\n Caught integer inside function”;
throiw;
}
cout<<”\nEnd of function”;
}
void main( ) {
cout<<”\n Inside main”;
try{
divide(10,3);
divide(30,0);
} catch(int) {
cout<<”\n Caught integer inside main”;
}
cout<<”\n End of main”;
}

problem 2)a) Give any 4 manipulators and their equivalent ios functions.

b) prepare a user defined manipulator called currency that prints L. prepare another user defined manipulator called form which prints **+798.650 ( width is 10). These manipulators must be used in main to display L**+798.650

c) In what order are the constructors called when a derived class object is created. Assume that there are virtual and normal base classes. Describe with a appropriate ex.

problem 3)a) Which of the following declarations and definitions must be put in the header file?

i) float f1;

ii) extern int sum;

iii) void putvalues(float * f, int size);

iv) inline bool isequal(const int &, const int &) { }

b) What are the differences between a reference parameter and a pointer? When should a pointer be used? When it should not be used? Describe it with suitable ex.

c) Give the three steps of function overload resolution.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M96625

Have any Question? 


Related Questions in C/C++

Assessment taskthis coursework will allow you to

Assessment Task: This coursework will allow you to investigate some of the issues involved in writing threaded programs. You are to write a series of simple programs in C/C++ that will run under Linux, to illustrate how ...

Writing a c code its a beginner level code design a class

Writing a C++ code, its a beginner level code. Design a class house that defines a house on a street. A house has a house number and an (x,y) location, where x and y are numbers between -10 and 10. the key member is plot ...

Programming in cbubba tubs bbq rub is a company that makes

Programming in C++ Bubba Tub's BBQ Rub is a company that makes different BBQ dry rubs and sauces. They make each product when it is ordered with the freshest ingredients and sell it by the unit. A unit is 2 ounces of pro ...

Computer sciencewhere do you think c and coding games in c

Computer Science Where do you think C++ and coding games in C++ is headed in the next five years? How about in the next 10 years? Do you think there are any significant improvements that need to be made to the code to en ...

Discussionobject-oriented design please respond to the

Discussion "Object-Oriented Design" Please respond to the following: • Suppose you were required to write a C++ program that captures and stores data about automobiles that a small dealership in your city sells. Consider ...

Programming cc assignmentsyoull need to download this to

Programming C/C++ assignments You'll need to download this To write the program. The programs will be written using the Microsoft Visual C++ Express Edition IDE (Integrated Development Environment), which can be download ...

Practice with pointers and dynamic memory

Practice with pointers and dynamic memory allocation Problem: Write a C++ program that will implement and test the four functions described below that use pointers and dynamic memory allocation. The Functions: You will w ...

Assignment a random mazewrite a new c program with the

Assignment (a) Random Maze Write a new C++ program with the following functionality: The program writes a greeting on the screen. Then the program displays a maze of ASCII symbols on the screen. The maze consists of 8 ro ...

Programming assignmentwrite a c program that allows the

PROGRAMMING ASSIGNMENT Write a C program that allows the user to make some banking transactions. The program should first prompt the user to enter the current balance of his/her bank account (in dollars and cents). The p ...

Assignmentconsider the following declarationsclass

Assignment Consider the following declarations: class bagType { public: void set(string, double, double, double, double); void print() const; string getStyle() const; double getPrice() const; void get(double, double, dou ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Section onea in an atwood machine suppose two objects of

SECTION ONE (a) In an Atwood Machine, suppose two objects of unequal mass are hung vertically over a frictionless

Part 1you work in hr for a company that operates a factory

Part 1: You work in HR for a company that operates a factory manufacturing fiberglass. There are several hundred empl

Details on advanced accounting paperthis paper is intended

DETAILS ON ADVANCED ACCOUNTING PAPER This paper is intended for students to apply the theoretical knowledge around ac

Create a provider database and related reports and queries

Create a provider database and related reports and queries to capture contact information for potential PC component pro

Describe what you learned about the impact of economic

Describe what you learned about the impact of economic, social, and demographic trends affecting the US labor environmen