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