Introduction to C
C is called mother of all languages, because if we programme in C, then our logic will developed and which can we use in further any other language programming.
Formate of a C programme- Programming in C language is very easy.
we use few steps to write a simple programme..
1. Programme is started with #include<stdio.h> and #include<conio.h> after that void main()
2. All statements are written b/w { } .
3. Press key ctrl+f9 to compile & run the programme.
4. Semi colon ( ; )is used after every statement under programme.
5. getch(); is used before ending of a programme.
6. Comments in a programme are written under /*.......*/ or //......
Example: Write a programme to print 'Hello World' on output screen.
// Code
#include <stdio.h> #include <conio.h> void main() { printf("Hello World"); getch(); }Output:
Hello World
Comments
Post a Comment