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++

Create your own unique while-end repetition structure you

Create your own unique While-End repetition structure. You decide the theme. You should provide both the pseudocode and the flowchart of your example. Be sure to provide an overview of what your repetition structure is d ...

Assignmentobjectivespractice reading characters from a

Assignment Objectives Practice reading characters from a file Practice using command line input Practice using command-line redirection of files Practice implementing a double transposition ciphering algorithm Summary In ...

C-programmingcreate a c program that sorts a sequence of

C-Programming Create a C program that sorts a sequence of positive numbers using the bubble sort algorithm in an increasing or decreasing order based on the user's choice. The pseudo code for the bubble sort algorithm is ...

1 write a c program that includes a function called lobster

(1) Write a C program that includes a function called lobster() that accepts three arguments: a character and two integers. The character argument is the character to be printed by lobster(). The second argument is the n ...

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 ...

Computer applications divisionassignment c programmingstl

COMPUTER APPLICATIONS DIVISION Assignment: C++ PROGRAMMING STL Vector For this assignment, you will be starting with an example program that demonstrates the use of a STL vector. In addition to this, you may need to look ...

The second portion instruction shown below which is the

The second portion (instruction shown below) which is the actual C++ program is needed by this Saturday. Write a C++ program that is menu-driven that allows for the following menu choices:Load an exam: Loading an exam sh ...

Cs 2410workshop make-up assignmentwrite a c program that

CS 2410 Workshop Make-Up Assignment Write a C++ program that will output to a file called output.txt EVERY 10 digit phone number from 713-000-0000 through 713-000-0998. These numbers MUST only contain an odd number of ev ...

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 ...

Programming assignment 5write a c program that allows the

PROGRAMMING ASSIGNMENT #5 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, not ...

  • 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