SIMPLE HELLO WORLD EXAMPLE IN C LANGUAGE
1. Simple Hello world example
#include<stdio.h> // to include library "stdio.h"
int main() // every c program starts with main function
{
printf("Hello World"); // printf() function prints whatever is placed within ' " " '
return 0;
}
Output: Hello World
Description:
Description:
1.First line "#include<stdio.h>" indicates that we want to use stdio.h library in our code.
2.int main() - all code is written in this block. "int" return type is integer.
3.printf("Hello World"); - to write a "hello world" message on console
How to run and execute:
Step 1 : Type this code in your turbo c compiler and save it with appropriate file name (ex: helloWorld.c).
Step 2 :Click compile -> compile
Step 3 :Click run ->run
Step 4 :Press alt+x to exit from turbo C and see the output.
Step 5 :To continue with your code type "tc" again.
In marathi language / рдорд░рд╛рдареАрдд рд╡рд░реНрдгрди
1.рддреБрдордЪреНрдпрд╛ turbo c рдХреЙрдореНрдкрд┐рд▓реЗрд░ рдордзреНрдпреЗ рд╣рд╛ рдХреЛрдб рд▓рд┐рд╣рд╛ .
2.compile -> compile рд╡рд░ рдХреНрд▓рд┐рдХ рдХрд░рд╛.
3.run - > run рд╡рд░ рдХреНрд▓рд┐рдХ рдХрд░рд╛.
4.рдЙрддреНрддрд░ рд╕рд╛рдареА alt + x type рдХрд░рд╛. рдордЧ рдкреЛрдЗрдиреНрддреЗрд░ turbo c рдЪреНрдпрд╛ рдмрд╛рд╣реЗрд░ рдпреЗрдгрд╛рд░. рдХреЙрдиреНрд╕реЛрд▓реЗ рд╡рд░ рддреБрдореНрд╣рд╛рд▓рд╛ рдЙрддреНрддрд░ рджрд┐рд╕реЗрд▓.
5.рдкрд░рдд turbo c рд╡рд░ рдпреЗрдгреНрдпрд╛ рдХрд░рд┐рддрд╛ рдХреЙрдиреНрд╕реЛрд▓реЗ рд╡рд░ "tc" рд▓рд┐рд╣рд╛.
Code description / рдХреЛрдб рдЪрд╛ рд╡рд░реНрдгрди
рдкрд╣рд┐рд▓реА рдУрд│ : #include<stdio.h> - рдЖрдкрд▓реНрдпрд╛рд▓рд╛ stdio.h рд╣реНрдпрд╛ library рдЪрд╛ рдХреЛрдб рд╡рд╛рдкрд░рд╛рдпрдЪрд╛ рдЕрд╕рд▓реНрдпрд╛ рдореБрд▓реЗ рд╣рд┐ рдкрд╣рд┐рд▓реА рдУрд│ .
рджреБрд╕рд░реА рдУрд│ :int main () - рдкреНрд░рддреНрдпреЗрдХ рдХреЛрдб рдордзреНрдпреЗ рд╣рд╛ рдореБрдЦреНрдп рдмреНрд▓реЛрдХреНрдХ. рд╕рдЧрд│рд╛ рдореБрдЦреНрдп рдХреЛрдб рд╣реНрдпрд╛ рдмреНрд▓реЛрдХреНрдХ рдордзреНрдпреЗрдЪ рд▓рд┐рд╣рд┐рд▓рд╛ рдЬрд╛рддреЛ.
рддрд┐рд╕рд░реА рдУрд│: printf() - рд╣рд╛ function console рд╡рд░ рд▓рд┐рд╣рд┐рдгреНрдпрд╛ рд╕рд╛рдареА рд╡рд╛рдкрд░рд▓рд╛ рдЬрд╛рддреЛ.
рджреБрд╕рд░реА рдУрд│ :int main () - рдкреНрд░рддреНрдпреЗрдХ рдХреЛрдб рдордзреНрдпреЗ рд╣рд╛ рдореБрдЦреНрдп рдмреНрд▓реЛрдХреНрдХ. рд╕рдЧрд│рд╛ рдореБрдЦреНрдп рдХреЛрдб рд╣реНрдпрд╛ рдмреНрд▓реЛрдХреНрдХ рдордзреНрдпреЗрдЪ рд▓рд┐рд╣рд┐рд▓рд╛ рдЬрд╛рддреЛ.
рддрд┐рд╕рд░реА рдУрд│: printf() - рд╣рд╛ function console рд╡рд░ рд▓рд┐рд╣рд┐рдгреНрдпрд╛ рд╕рд╛рдареА рд╡рд╛рдкрд░рд▓рд╛ рдЬрд╛рддреЛ.
Comments