Skip to content

Tag Archives: cpp-parameter-passing

Array of Objects:It is an array whose elements are of the class type. It can be declared as an array of any datatype. Syntax: classname… Read More
In C++, we can pass parameters to a function either by pointers or by reference. In both the cases, we get the same result. So… Read More
What is Array Decay? The loss of type and dimensions of an array is known as decay of an array.This generally occurs when we pass the… Read More
How to compute size of an array parameter in a function? Consider below C++ program: // A C++ program to show that it is wrong… Read More
Predict the output of following C++ programs. 1) #include <iostream> void init(int a=1, int b=2, int c=3);    int main() {     init();     return 0; }… Read More
This post is an extension of How to dynamically allocate a 2D array in C? A one dimensional array can be easily passed as a… Read More