This C++ program demonstrates the use of an inline function to display integer numbers. The inline function displayNum() is defined to print an integer parameter to the console. Main() calls displayNum() three times, passing the values 5, 8, and 666, which are then printed to the output as expected.
This C++ program demonstrates the use of an inline function to display integer numbers. The inline function displayNum() is defined to print an integer parameter to the console. Main() calls displayNum() three times, passing the values 5, 8, and 666, which are then printed to the output as expected.
This C++ program demonstrates the use of an inline function to display integer numbers. The inline function displayNum() is defined to print an integer parameter to the console. Main() calls displayNum() three times, passing the values 5, 8, and 666, which are then printed to the output as expected.
This C++ program demonstrates the use of an inline function to display integer numbers. The inline function displayNum() is defined to print an integer parameter to the console. Main() calls displayNum() three times, passing the values 5, 8, and 666, which are then printed to the output as expected.
Aim:- Write a Program in C++ to demonstrate Inline Function.
Program:- #include <iostream.h> using namespace std; inline void displayNum(int num) { cout << num << endl; } int main() { // first function call displayNum(5);