Image

Programs - C Language - Type Casting

Program:


#include<stdio.h>
#include<conio.h>
void main()
{
int i = 17;
char c = 'd'; // ascii value is 100
int sum;

  sum = i + c;
printf("Value of sum : %d\n", sum );
  getch();
  clrscr();
}