Sunday, March 3, 2019

keywords in C || how many keywords in C|| with simple programs



kyewords-in-c
kyewords-in-c

              keywords in C
 || how many keywords in C||


 there are 32 keyword in C

 auto         double        int                struct
 break       else             long             switch
case          enum          registered     typedef
char          extra           data              Union
const         float           short             unsigned
continue    for              signed          void
default      goto            sizeof           volatile
do              if                static             file

DATA TYPES IN C

           NAME        SHORT       SIGN      TAKE BITE 
  
integer          int              %D              2
character      char           %c                1
float              float         %f                 4
string            str            %s                 2
doube           double     %ld                8
long              long        %lf                10
long integer long int    %ld                4


SIMPLE PROGRAMS

Q1:-make a program who print "hello world"

#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
printf("hellow world");
getch();
}
output:-   hellow world


Q1 make a simple program who print      1
                                                                 23
                                                                456 


#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
printf("1\n 23\n456\n");
getch();
}


DATA TYPE VICE PROGRAMS

INTEGER
SHORT NAME - INT    SING-  %d
TAKE BYTE -2
RANGE= -32768  To 32767

Q1 MAKE A PROGRAME WHO ADD A=5 ,B=5 AND PRINT OUTPUT

#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
int a=5, b=4;
Sum=a+b;
printf("%d",Sum);
getch();
}

Q2 MAKE A PROGRAME WHO ADD TWO NUMBERS AND PRINT OUTPUT

#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
int a,b sum;
printf("enter a &b");
scanf("%d,%d",&a,&b);
sum=a+b;
printf("please sum the two values %d", sum);
getch();
}

Q3 make a program  calculate the area of rectangle:



#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
int a,b area;
printf("enter a&b");
scanf("%d,%d",&a,&b);
area=a*b;
printf(" %d", area);
getch();
}

                                                                  FLOAT



Q1 MAKE  A PROGRAM  FOR TEMPRATURE CHANGEMENT
#include<stdio.h>
#include<conio.h>
void main()
{
clrser();
float c,f;
printf("enter f");
scanf("%f",&f);
c=(f-32)*5/9;
printf("%f", c);
getch();
}