Question

Pointer variables are just memory addresses and ca
0 0
Add a comment Improve this question Transcribed image text
Answer #1

23.

Pointer variables are just memory addresses and can be assigned to one another withoutregard to type.-

Ans:- FALSE

Explanation:-

A pointer variable, like everything else in C++ is typed, and that typing isenforced strongly. A pointer variable of typedouble*cannot normally hold apointer value of typeint*for example

24:A pointer is an address, an address is an integer, but a pointer is not an integer.

Ans:- TRUE

Explanation:-

This is not too crazy or far off. Rather, this is an abstraction. The type system inC++ is sufficiently strong that it requires that you not assign pointer values toother types nor other types to pointers (without a cast, but that tells the compileryou know what you are doing, so it lets you.)

25:- When declaring several pointer variables, there must be one pointer declarator * for eachpointer variable

Ans:-TRUE

Explanation:-

  • Consider this definition ofp1,p2andp3as pointers todoubles:double *p1, *p2, *p3;
  • There must be one*for each pointer variable defined
Add a comment
Know the answer?
Add Answer to:
Pointer variables are just memory addresses and can be assigned to one another without regard to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes...

    TRUE/FALSE 1. If pl is an integer pointer variable, with the value of 1000, pl++ changes P1 to point to the memory location 1001. ANSWER: T 2. When you return a dynamic array to the freestore, you must include the number of elements in the array 3. You can assign an array to a pointer variable. 4. The size of dynamic arrays must be declared at compile time. 5. int *pl; declares a static variable. ANSWER: F ANSWER: F ANSWER:...

  • C++ Language 1. True/False: You can use pass by reference when passing a C++ unique pointer...

    C++ Language 1. True/False: You can use pass by reference when passing a C++ unique pointer to a function. a)True b)False 2. True/False: A temporary value in a program can be referred to by at most one lvalue reference. a)True b)False 3. A unique pointer is a pointer a that is declared in a block of code in which it is the only pointer. b that is declared in a function in which it is the only pointer. c that...

  • C Programming QUESTION 2 Which of the following statements about pointer arguments are true? Select all...

    C Programming QUESTION 2 Which of the following statements about pointer arguments are true? Select all choices you believe are correct--this question may have more than one correct answer! A. The * operator allows you to access the address of an existing variable, while the & operator allows you to dereference a pointer and access the data to which it points. B. A function with pointer arguments must have the void return type. C. Pointer arguments allow you to write...

  • Write the code to dynamically allocate ONE integer variable using calloc (contiguous allocation) or malloc (memory...

    Write the code to dynamically allocate ONE integer variable using calloc (contiguous allocation) or malloc (memory allocation) and have it pointed to by a pointer (of type int * ) named ptr_1. Use ptr_1 to assign the number 7 to that dynamically allocated integer, and in another line use printf to output the contents of that dynamically allocated integer variable. Write the code to dynamically allocate an integer array of length 5 using calloc or malloc and have it pointed...

  • please answer all question CSE 110 Introduction to Computer Science 41. An array of size 10,...

    please answer all question CSE 110 Introduction to Computer Science 41. An array of size 10, has only nine slots for storing values TRUE FALSE 42. When is the external name of the file used in the program? A. Any time you read or write to the file B. Never C. Only when reading from the file D. When opening the file stream 43. Creating a flow chart when designing a complex algorithm is a waste of time. TRUE 44....

  • Programs written in a language that supports pointers and dynamic memory allocation can suffer from dangling...

    Programs written in a language that supports pointers and dynamic memory allocation can suffer from dangling pointers and lost heap-dynamic variables (or garbages). (a) A dangling pointer is a pointer that contains the address of a piece of memory that no longer belongs to the program. Give one scenario that can cause dangling pointers. Support your scenario with sample codes in your favorite language. Poorly implemented languages leave the detection of the dangling pointer problem to the operating system. Suggest...

  • The following variables have been declared and assigned values: integer a = 10, integer b =...

    The following variables have been declared and assigned values: integer a = 10, integer b = 2, float c =4.0, float d=3.0. State the value of the variable after each statement is executed. Part a: c = a / b + d / b – (b – a)                                    c =__________________                   Part b: a = (b > a)                                                         a =__________________ Part c: d = d + b                                                            d =__________________ Part d: a = b / d + a + b /...

  • visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code b...

    visual basic help DI Question 3 2 pts You may only bind an object to a control that the computer creates for you O True O False D | Question 4 2 pts The Do..Loop statement can be used to code both a pretest loop and a posttest loop. True False Question 5 2 pts You can prevent many unintentional errors from occurring in an application by declaring the variables using the maximum scope needed. True False 2 pts Question...

  • Fill the blank in each of the following using the terms at the bottom. IT. When...

    Fill the blank in each of the following using the terms at the bottom. IT. When an array is created, a value in the array is called a(n) 12. f and ) must always be used with an if) statement: True or False 13. Theoperator is used to check if two values are equal. 14. A command can only be used in a loop statement. 15. Acommand can be used in both a loop and switch statement. 16. In the...

  • C Programming 12 1 point We can write a large amount text data to a file...

    C Programming 12 1 point We can write a large amount text data to a file without punctuation and will be able to make sense of that data when looking at the file with notepad. True False 13 1 point a When calling the function to open a file in read mode can cause the contents of the file to be erased. True False 14 1 point Writing a struct to a binary file is similar to writing an integer...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT