• 1: #include <iostream.h>
• 2: // function Demonstration Function
• 3: // prints out a useful message
• 4: void DemonstrationFunction()
• 5: { cout << "In Demonstration Function\n"; }
• 6: // function main - prints outa message, then
• 7: // calls DemonstrationFunction, then prints
• 8: //out a second message.
• 9: int main() { cout << "In main\n" ;
• 10: DemonstrationFunction();
• 11: cout << "Back in main\n";
• 12: return 0; }
Output for Function call :
• In main
• In Demonstration Function
• Back in main
• 2: // function Demonstration Function
• 3: // prints out a useful message
• 4: void DemonstrationFunction()
• 5: { cout << "In Demonstration Function\n"; }
• 6: // function main - prints outa message, then
• 7: // calls DemonstrationFunction, then prints
• 8: //out a second message.
• 9: int main() { cout << "In main\n" ;
• 10: DemonstrationFunction();
• 11: cout << "Back in main\n";
• 12: return 0; }
Output for Function call :
• In main
• In Demonstration Function
• Back in main
Great Article! I got too much information from this post. Thanks for sharing such a helpful article.If any one who want to learn C&C++ get a free demo call on 9311002620 or visit -https://htsindia.com/Courses/embedded-systems-and-robotics/cplusplustraininginstituteinsouthdelhi
ReplyDelete