Explain "const" reference arguments in function?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ General Interview Questions

What is a c++ map?

0 Answers  


Why do we use pointers in c++?

0 Answers  


How do I use turbo c++?

0 Answers  


What is the use of setprecision in c++?

0 Answers  


Why do we learn c++?

0 Answers  






1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?

5 Answers  


Who made c++?

0 Answers  


Problem 5: Hero's Formula is A method for calculating the area of a triangle when you know the lengths of all three sides. Let a, b, c be the lengths of the sides of a triangle. The area is given by:A= pp-ap-b(p-c) | wherep= a+b+c2 | | Write a C-language code to calculate area of triangle using above method. Take the three lengths of the triangle from the user and display the area that your program calculates.

0 Answers   Maxobiz,


What are C++ inline functions?

1 Answers  


What is the keyword auto for?

0 Answers  


What happens if an exception is throws from an, object's constructor and object's destructor?

4 Answers   Wipro,


Can you explain the term "resource acquisition is initialization?"

1 Answers   Amazon,


Categories