General form ->Watch this for FUN - Funny job interview Are you getting bored with online lectures? ->Watch this - When online lectures are boring Generally, the C program starts with the header files , followed by preprocessor directives (like macros), and then followed by the functions or the variables to be declared globally which is again followed by the main function for starting the execution. #include<stdio.h> // Header files #define a 10 // Preprocessor directives int x=10; // Global variable int main() // main function { }
Function in C ->Watch this for FUN - Funny job interview Are you getting bored with online lectures? ->Watch this - When online lectures are boring Function in C is a very important topic in C. The library in C has many in-built functions like printf, scanf, etc. Every C program has at least one main function where the code starts executing. The main function is declared using int main(). Now, we'll be going to see various types of function declaration, their return types, etc. There are three main things for executing a function in C programming language which are its declaration , its calling , and its execution . The return type of function includes primitive and derived data types. For data types, refer to this. Function declaration : There are two ways where you can declare/call a function. Way 1 : Declaring outside the main, globally, int(return type) fun(data type of arguments); For example, void fun(int...