variable

naming of  Vriable -

  • A variable name can contain alphabetsdigits, and underscore (-) only.
  • The starting letter can not be a digit.
  • White spaces cannot be used.
  • The name .should not be reserved keyword or special character
variable declaration
int roll no(5)
float mark(5.66)
char grade (a)



1st way:

int a = 12;

2nd way:

int a;
a= 12;
#include <stdio.h>

int main()
{
    int a = 12.2221;
    printf("Output = %d" , a);
    return 0;
}
out put is 12 
#include <stdio.h>

int main()
{
    float a = 12.2221;
    printf("Output = %f" , a);
    return 0;
}
output is 12.22221

how we can get size of keyword and data type in this programme we can get
#include <stdio.h>

int main()
{
   
    printf("%lu",sizeof(int));
    return 0;
}

Comments