Define the types of the expressions

Assignment Help Computer Engineering
Reference no: EM1331572

1.
Consider

int a, b;

int *prt; //A pointer
int **prtPrt //A pointer to a pointer

ptr = &a;
prtPtr = &ptr;

a. Is this code legal?
b. What are the values of *ptr and **ptrPtr?
c. Using no other objects besides those already declared, how can you alter ptrPtr so that is points to a pointer to b without directly touching ptr?
d. Is the following statement legal?

2.
a. ls *&x always equal to x? If not, give an example
b. ls &*x always equal to x? Uf not, give an example

3.
For the declarations
int a = 5;
int *ptr - &a;

what are the values of the following?
a. ptr
b. *ptr
c. ptr == a
d. ptr == &a
e. &ptr
f. *a
g. *&a
h. **&ptr

4
Give the typr of each identifier declared here and the types of the expressions. Is any expression illegal?

a. struct X { inta; S *b; };
b. S z;
c. S *x;
d. x->a
e. x->b
f. z.b
g. z.a
h. *z.a
j. (*z).a
k. x->b-z.b
l. &z
m. &x

5
Is the following code legal? Why or why not?

int a = a;
const in & b = a;

6
What is worng with omitting a space in *x/*y?

Reference no: EM1331572

Questions Cloud

Show the command line and accept one interger as input : Call a function the outputs seven sequential intergers, with input interger as the middle item on the command line below the input prompt.
How retail trends affected consumer behavior : How have retail trends affected consumer behavior? How have consumers affected the retail industry? Which carries more influence over the other? Why?
Illustrate what value for r is optimal for the seller : Illustrate what value for r is optimal for the seller, and what then is the seller's expected profit.
Risks associated in employee engagement : Risks associated in Employee Engagement - What staffing factors (teamwork, hiring decisions, retooling of current employees, et cetera) needed to be considered?
Define the types of the expressions : Using no other objects besides those already declared, how may you alter ptrPtr so that is points to a pointer to b without directly touching ptr?
A reasonable accommodation : What would be a reasonable accommodation that an employer could make to satisfy both the Christian and non-Christian employees?
At which point do you reach equilibrium : At which point do you reach equilibrium. Also explain why is that considered equilibrium.
Who approves and rejects resources : Who approves and rejects changes to the scope of the project and Who approves and rejects resources
Common runtime libraries such as visual studio.net : should C++ programming language be extended to contain an XML editor and parser as is the case for the Java® programming language, or should this be built into the Integrated Development Environment (IDE) that supports the programming language?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the fundamentals of object oriented programming

With down a brief introduction, explain the fundamentals of Object Oriented programming and its differences from procedural programming.

  Explain the importance of having a test coupled

Many will argue that it is considered a good practice to acknowledge the limitation of your research/project. Could you defend this argument.

  What can be done to minimize the errors

Where are the majority of defects found in a final program introduced? What can be completed to minimize these errors.

  Problem on bubble sort algorithm

Problem on Bubble sort algorithm

  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.

  What will be the list assumptions for the scope of project

What will be the list assumptions for the scope of project? Give detailed and measurable non functional requirements.

  Process seteditable is a jtextcomponent method

Menus require a JMenuBar object so they can be attached to a JFrame.

  Creating flowchart and pseudocode utilizing control breaks

Generate a Flowchart and Pseudocode utilizing the Control Breaks for Xhemrock is a brake pad manufacturing company. This company utilizing the raw materials like carbon powder, ash, iron, and resin.

  Recognizing the error

Make out error in the following given code:#include //Line 1 using namespace std; //Line 2

  Explain two methods for categorical data conversion

explain two methods for categorical data conversion. List the advantages and disadvantages of this approach.

  Application for verifying pin number

The National Commerce Bank has hired you to generate an application which verifies a customer personal identification number (PIN).

  Create java console program using the class fraction

plan the class Fraction that can be used to manipulate fractions in a program. Among others, class Fraction must include methods to add, subtract, multiply, and divide fractions. When you add, subtract, multiply, or divide fractions, your rply nee..

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