Write a c program to demonstrate Type casting in c?

Answer Posted / pinkey

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

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is it that not all header files are declared in every C program?

663


Why ca not I do something like this?

580


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

637


Can an array be an Ivalue?

652


How many keywords are there in c?

578






Are bit fields portable?

664


What are the basic data types associated with c?

799


What are local variables c?

535


How is actual parameter different from the formal parameter?

579


Why string is used in c?

565


Explain the use of bit fieild.

698


When I tried to go into a security sites I am denied access and a message appeared saying 'applet not initialize'. How can I rectify this problem.

1512


What is use of integral promotions in c?

647


how many types of operators are include in c language a) 4 b) 6 c) 8 d) 12

635


What are the disadvantages of a shell structure?

680