Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Arrays
6.5K+ articles
C++
4.3K+ articles
C++ Programs
2.4K+ articles
C Language
1.8K+ articles
cpp-array
174+ articles
cpp-pointer
96+ articles
C++-Class and Object
27+ articles
C Array and String
17+ articles
cpp-parameter-passing
7 posts
Recent Articles
Popular Articles
Passing array of objects as parameter in C++
Last Updated: 20 June 2022
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 array_name [size];Below is the C++ pr...
read more
C++ Programs
C++
DSA
Arrays
cpp-parameter-passing
C++-Class and Object
How to pass a 2D array as a parameter in C?
Last Updated: 04 March 2025
A 2D array is essentially an array of arrays, where each element of the main array holds another array. In this article, we will see how to pass a 2D array to a function.T...
read more
C Language
cpp-parameter-passing
cpp-array
cpp-pointer
C Array and String
Some Interesting facts about default arguments in C++
Last Updated: 14 December 2022
Predict the output of following C++ programs.1)C #include iostreamvoid init(int a=1, int b=2, int c=3);int main(){ init(); return 0;}void init(int a=1, in...
read more
C Language
C++
cpp-parameter-passing
How to print size of array parameter in C++?
Last Updated: 26 December 2023
How to compute the size of an array CPP?C++ // A C++ program to show that it is wrong to // compute size of an array parameter in a function#include iostreamusi...
read more
C Language
C++
cpp-parameter-passing
cpp-array
cpp-pointer
What is Array Decay in C++? How can it be prevented?
Last Updated: 08 May 2024
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 array into function by value or point...
read more
C Language
C++
cpp-parameter-passing
cpp-array
cpp-pointer
Passing By Pointer vs Passing By Reference in C++
Last Updated: 11 January 2025
In C++, we can pass parameters to a function either by pointers or by reference. In both cases, we get the same result. So, what is the difference between Passing by Point...
read more
C++
pointer
cpp-parameter-passing
cpp-references
Const Reference vs Normal Parameter Passing in C++
Last Updated: 24 April 2025
In C++, when we call a function we can also pass the parameters to the function in many ways like pass by value, pass by reference, pass by pointer, and by const reference...
read more
C++ Programs
C++
Picked
cpp-parameter-passing
CPP Examples
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !