How do I run codes on other than the default 'main' tab?

–1 vote
asked Oct 6 by (150 points)

2 Answers

0 votes
answered Oct 6 by (3,550 points)
Other tabs present in same IDE specifies the multi file project.
Such as in C, you can create custom header file and can include in main or other file.
Here is brief example
https://www.onlinegdb.com/blog/introducing-multifile-project/
0 votes
answered 6 days ago by anonymous
Create another .c file and use that. Make sure nothing is in main.c file, especially header files or it won't compile.

Or

create your own header files by creating a file with .h file extension and in main.c call the .h file by #include "name.h"

Your own .h file can store functions and data etc
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...