Your First C Program

Previous: Feautures Of C Next: Compilation Process In C 

To write the C Program, Open the C Console and write the following code :
#include<studio.h>

int main() {
    printf("Hello world");
    return 0;
}

Here, #include<stdio.h> means you are including functions from in-built library, stdio.h. stdio.h contains standard input and output functions like printf() and scanf().

Then you are creating a function named as main(), indicating you are returning integer value with int main(). Compiler will look for the function main and execute that function in the program. So your program must have this main function.

printf() function print data in the console.

return 0 means you returned the integer value 0 to the main function. Generally, 0 can be indicated as successful execution and 1 as failed execution.


Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.