Witer a program to Represent integer constants.

We rarely use octal and hexadecimal numbers in programming. The largest integer value that can be stored in machine-dependent. It is 32767 on 16-bit machines and 2,147,483,647 on 32-bit machines.


#include <stdio.h>
main()
{
printf("Integer values\n");
printf("%d%d%d\n", 32767,32767+1,32767+10);
printf("\n");
printf("Long integer values\n\n");
printf("%ld%ld%ld\n", 32767L, 32767L+1L, 32767L+10L);
return 0;
}


Output:

Integer values

32767 -32768 -32759

Long integer values

32767 32768 32777

0 comments:

Post a Comment

 

About Me

It's Me!Hi, I'm Moinuddin. I'm a Software Engineer at WIPRO working on Microsoft .NET Technology. I'm interested in a wide range of technology topics, mainly Microsoft including Windows Azure, WCF, WPF, Silverlight and any other cool technology that catches the eye.

Site Info

ProjectCSharp.com is mainly about demonstrating real time examples in different technologies like ASP.NET, WCF, WPF, Silverlight, Azure etc..,

Followers

Help Links

Project CSharp (C#) Copyright © 2011. All Rights Reserved.