5 years ago in C++ Functions

One of the disadvantage of pass by reference is that the called function may inadvertently corrupt the called data.This is avoided by ?

[A] passing pointers
[B] declaring the formal parameters constant
[C] declaring the actual parameters constant
[D] all of above
Loading...
Next Question

Overall Stats

Attempted 172
Correct 25
Incorrect 46
Viewed 101

Answers

Guest
Guest
Katreen Ebraheem
Katreen Ebraheem - 1 day ago

Katreen Ebraheem from Egypt is saying passing pointers is correct answer

Tooba Mustafa
Tooba Mustafa - 1 month ago

Tooba Mustafa is saying passing pointers is correct answer

indhuja indhuja
indhuja indhuja - 4 months ago

indhuja indhuja from Erode, India is saying all of above is correct answer

Bharath Chandra Reddy
Bharath Chandra Reddy - 5 months ago

Bharath Chandra Reddy is saying declaring the formal parameters constant is correct answer

pavithra p
pavithra p - 8 months ago

pavithra p from Bengaluru, India is saying passing pointers is correct answer

Related Questions

Dividing a program into functions

  • [A] is the key to object oriented programming
  • [B] makes the program easier to conceptualize
  • [C] makes the program run faster
  • [D] both (B) and (C)

Which of the following type of function is an ideal candidate for being declared inline ?

  • [A] A function that is small and is not called frequently
  • [B] A function that is small and is called frequently
  • [C] A function that is not small and is not called frequently
  • [D] A function that is not small and is called frequently

Which of the following statement is incorrect?

  • [A] Default arguments can be provided for pointers to functions.
  • [B] A function can have all its arguments as default.
  • [C] Default argument cannot be provided for pointers to functions.
  • [D] A default argument cannot be redefined in later declaration.

Which of the following parameter passing mechanism is/are supported by C++ but not in C?

  • [A] Pass by value
  • [B] Pass by reference
  • [C] Pass by value result
  • [D] All of the above

Which member function of class cannot modify its objects attributes ?

  • [A] friend functions
  • [B] Private member functions
  • [C] Constant member functions
  • [D] Static member functions