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

  Diffe-hellman algorithm

Alice and Bob use the Diffe-Hellman to agree on a secret key. They select the prime p = 11, and a primitive root mod 11 g = 2.

  Creating a print chart or sample output

suppose you have a bank account that compounds interest on a yearly base. In other words, if you deposit 100 dollars for two years at 4 percent interest, at the end of one year you will have $104 .

  Implement needham-schroeder protocol using python

Implement Needham-Schroeder symmetric key protocol, both original version and fixed version using python.

  Write down an application that reads 3 integers

Write down an application that reads 3 integers

  Management systems do for sales and marketing

What can the knowledge management systems do for Sales and Marketing? What can they NOT do?

  The acme corporation is looking to rapidly advance

This solution provides the learner with an understanding of how best to accomplish the task. This solution is comprised of over 2000 words of text with 4 references.

  Explain the software packages in detail

explain the software packages in detail. analysis of the advantages and disadvantages of each of the software packages used.

  The difference between animation and transition effects

When are they appropriate? When is it better not to use them? Can you give me an examples.

  Describe how left explanation is useful while formatting

Describe how left explanation is useful while formatting

  Make use of method iteration to find a formula expressing

How several elementary operations are used in the following algorithm? The elementary operations are comparison operations (such as > and

  What is the variety of addresses available in each networks

What is the variety of addresses available in each  networks

  Impact on the quality of software available for used

Will commercial software manufacturers be justified in raising their prices to make up for revenue lost to open source competitors? Do you think that strategy will be effective.

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