What will be the output of the following c++ code

Assignment Help Computer Engineering
Reference no: EM1331535

1. What is the output of the following C++ code?

int x;
int y;
int *p = &x;
int *q = &y;
*p = 35;
*q = 98;
*p = *q;
cout << x << " " << y << endl;
cout << *p << " " << *q << endl;

2. What is the output of the following C++ code?

int x;
int y;
int *p = &x;
int *q = &y;
x = 35; y = 46;
p = q;
*p = 78;
cout << x << " " << y << endl;
cout << *p << " " << *q << endl;

3. What is the output of the following C++ code?

int *p;
int *q;
p = new int;
q = p;
*p = 46;
*q = 39;
cout << *p << " " << *q << endl;

Reference no: EM1331535

Questions Cloud

Explain advertising for moving traditional business : Explain which are the best advertising strategies for transforming regular businesses to Internet marketplace.
A viable strategy to implement : Consider who the merger or acquisition would involve, the market conditions making it a good choice, and the type of strategy that would make it a success.
Assume an individual purchases of good : Assume an individual purchases 500 units of good and spends 10,000 dollars.
Explain transformation of avon into a leading company : Andrea Jung is the CEO for Avon Products Inc. What can she do to accelerate the transformation of Avon into a leading company? What strategic plans can be used to accelerate growth?
What will be the output of the following c++ code : What will be the output of the following C++ code.
Elucidate the interpretation of the coefficient : Elucidate the interpretation of the coefficient b. Do the demand functions satisfy the relevant homogeneity conditions.
Explain consumer buying patterns : The marketing manager for a manufacture of specialty watches designed for runners. ask - Would you sell these items through retail stores or would you try to direct marketing * either alone or in combination with retail distribution) ? Why?
Make program to gauge the expected cost of an item : It is tough to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year, you cannot simply use this year's price as the price of pencils two years from now. Because of inflation the cost is ..
Explaining company overpay their income taxes : Why might a company overpay their income taxes?

Reviews

Write a Review

Computer Engineering Questions & Answers

  A java based program to calculate the maximum heart rate

Write down a java based program to calculate the Maximum heart rate of person based on the person age and height. Notify for the low end of the target zone (65%) and high end of the target zone (90%).

  Implementing the stack using dynamically allocated array

Write down the C++ class which implements the stack utilizing the dynamically allocated array. The initial size of the particular stack must be evaluated when it is generated.

  Mathematics in computing

Write the selection sort algorithm

  Requirements for telecommunications planning

Discuss what do you understand by the general estimate requirements for the enterprise telecommunications planning and also explain in detail the cable estimating procedures.

  What is time estimate

How does an estimator arrive at a time estimate for a particular task.

  Java application that indicates invalid ticket number entrie

Ticket numbers are designed so that if you drop last digit of the number, then divide the number by 7, the remainder of the division would be identical to the last dropped digit.

  How term "educational technology" covers a wide range

The word "educational technology" covers a wide range of tools and methods exploiting computers, networks and media for delivering knowledge. Compare virtual classes with minimum  two other delivery methods (TV-based courses, on-site company trai..

  Information systems management

Describe at least three issues/problems with the Information Systems Management (ISM) in a named organization and explain at least three measures to address those issues. Explain the different measures that are effective? Why or why not?

  How to store ten floating-point values into vector

How to store ten floating-point values into vector. Write down a program that declares a vector of ten floating-point values

  Benefit and drawback of each major operating system

Benefit and drawback of each major operating system

  Handling the situation of passing of fragment through filter

If ?rst fragment is rejected, all the susequent fragments can be rejected. Though, the nature of IP is such that fragments can arrive out of order. However, an intermediate fragment may pass through ?lter before initial fragment is rejected.

  Define the implementation of a software application

This file contains a formatted MS Word file containing the example of project management analysis used for the implementation of the software application at The Coca-Cola Company.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd