CS201-Introduction to Programming C PROGRAMMING… on Assignment Solution
C PROGRAMMING… on Assignment Solution
In previous lecture we have discussed about what the programming actually is.
In today’s lecture we will learn about features of C language and structure of basic program…
Features Of C Programming Lanugae
It is the native language of UNIX Operating Sysytem,and have many features in it like;
Midddle Level Language ( Middle level because it is easily understood by system also ) Portable Language (Portable is the thing that has its own software and hardware. (C language hardware programming is hardware programming as welll as SOFTWARE PROGRAMMING ) Small but powerfull language. Case sensitive language (Case sensitive means if we use capital alphabets at place of small then there will be error) Efficient Language Easy to learn and use Base for all the languages
Basic Structure Of A C Program!
#include<stdio.h>
#include<conio.h>
void main(void) {
Main Program
}
Explanation Of The Code;
#include<stdio.h> & #include<conio.h>
These are known as the Preprocessor directives. These are instructions for the compiler,that what we are going to do, with it.
Now what are the Preprocessor Directives?
These are the instructions for a compiler that we are going to include the header files stdio.h and conio.h or math.h.
stdio.h;
Stands for Standard Input Output Function
conio.h;
Stands for Console Input Output function (console mean a balck window in which we run our programe)
Math .h;
Stands for Mathematical functions like square root and power etc. .h is the extension of Header File.Its mean header file but in “C”.We use its extension which is .h
Header Files!
These are also called Library Files. These are the built in functions and part of C Compiler and contain the definitions of FUNCTIONS.
Built In functions;
Header files have in built functions. Means If you will not declare the header file <stdio.h> then your program will neither input any value nor it will give an output. Because stdio.h stands for standard input output that means it contains the Input & Output functions.
Similarly if you want to make any mathematical program taking square root then YOU will have to declare the header file math.h otherwise You wont be able to execute the function of square root. So these are the in built functions.
Void main (void);
Means that we are not getting any value in return.Return will be null.void means “nothing” or “empty”.
And main program;
We write code in main program.What ever program we are editing or writing code of any program its all happened between “{ }”
Steps Of Making C Program!
1. Creating & editing
2. Saving with an extension .c
3. Compiling (In this process a Source program is converted into Object program)
4. Linking (To Create .exe file)
Linking Means when you make a program then You link it with an .exe file so that if you have completed a program and you dont want a c program to open then You will open that exe file and will act as a Program.
Or Linking! In this process Program is is linked with the object code to make your program as an executable file.
5. Executing (In this process we run the program and see the output)
We will meet in coming lectures inshaALLAH….Best of luck and STAY ATTACHED WITH ASSIGNMENT SOLUTION FOR BETTER LEARNING PROCESS IN PROGRAMMING SPECIALLY..
Thanks…
About the Author
anamzara is seo expert artilce expert and webdeveloper since five year.
Tell others about
this page:
Comments? Questions? Email Here