Introduction to C language | #Tut-01
So, hey guys..
This is our very first lecture. In this lecture we will see the history of C language.
Here I have tried to give short and essential information about the C language.
Hope you would like it..😊
So, very firstly we will see how our first program looks like..
Program:
#include <stdio.h>
int main()
{
printf("Hello World..!");
return 0;
}
Output:
Hello World..!
In the following way our program is always devided into the parts as shown in fig. below.
Now, we use an english language to writer our C programs.
So, let us see which are those characters, digits and symbols which are allowed to use while writing the programs.
As well as we see that what is an identifier..? and what is variable..?
Now as we know what the variable is, we should also know about the type of variables and what are rules for declaring the variables..
So, let's study what are the rules which we need to follow..
Now as we know about types of variables, it's time to know about the various data types which we will be using throughout the C language.
Basically data type is nothing but it is a container to store the different types of values e.g. integer, float, character, etc. and we can access that values by using the format specifiers.
As I said that, data types are the containers to store the values, then that containers are going to full after the certain limits and that limit is called as range of data type.
i.e. in the C language we can enter the integer numbers upto one certain limit
and again it is depend on the size of integer on your hardware.
e.g. for 2 bytes of int --> -32768 to 32767
whereas for 4 bytes of int --> approx. 10 cores
So this may vary from hardware to hardware.
* Here you do not need to remember all the ranges. (int, char just keep in mind)
Program :
#include<stdio.h>
// using format specifires for accessing the variables..
// c is the formatted laguage..
int main(){
// printing integer
int rollNo;
rollNo = 04;
printf("My roll no. is %d\n", rollNo);
// %d is the format specifier..
// printf("\n"); --> for new line
// printing float
float percentage;
percentage = 92.33;
printf("my percentage is %f\n", percentage);
// printing character
char initial;
initial = 'O';
printf("my initial is %c\n", initial);
return 0;
}
Output:
My roll no. is 4
my percentage is 92.330002
my initial is O
and here we are done with basics of C language..
Hope you got it..😊
Meet you in next tutorial..
Thank You..!
Thank you kiruu...bhaiii...❤️🤩
ReplyDeleteand great work yaar ...♥️
Mention not dear..😊
Deleteafterall this is started only because of you..
so keep learning and keep exploring..😇
It's really helpful for biggners 👍
ReplyDeleteThank you dii for your kind words..🌸
DeleteIt gives me motivation to create such a content..😊
Great share buddy 😃 Such amazing info.. it's really helpful to others..😊keep going and best wishes 😇
ReplyDeleteThank you very much..🤗
DeleteKeep supporting buddy..😊
🤩🤩
ReplyDelete😊🙏
DeleteThanks bro ❤️
ReplyDelete😇🌸
Delete