BASICS OF C LANGUAGE:
'C-Language' is the basic language for all programing languages.Here the basics of c and some of tha DATA STRUCTURES programs has been explained with examples. Some of the advanced concepts like pointers, linked list, that has been given with C++ example also. So rock yourself in C language.
Lets start with the basics of C...(Welcome)
Example-:
#include
#include
void main()
{
clrscr();
printf("WELCOME TO DATA STRUCTURES USING C");
getch();
}
Explaination:
The above C program is used to display the given string as out put.
OUTPUT:
WELCOME TO DATA STRUCTURES USING C
Example-:
#include
#include
void main()
{
clrscr();
int a;
a=25;
printf("My Age is: %d",&a);
getch();
}
Explaination:
The above C program is used to display the age 20 as out put.
OUTPUT:
My age is: 25
KEEP IT IN MIND:
- A C program Must starts with proper HEADER FILES.
- All the lines should be ended with semicolan (;).
- A C program must be written inside the MAIN() Function.
- The main() function should starts and ends with Flower Braces {}.
No comments:
Post a Comment