Write on signed and unsigned integers and give three (3)
examples each

Answer Posted / durga.g

signed integers : which contains both the +ve and -ve numbers
. The format specifier for signed integers is %d or we can
use %i also.
the range is same as the int.

Unsigned integers:
the range of unsigned integer is 0to65535.
the format specifier for this is %u.
generally this is used to print the address of a variable.
unsigned integer doesnt contain negative value.
eg:
main()
{
int i;
printf("enter i value");
scanf("%d",&i);
printf("the value stored in the i variable is%d",i);
printf("address is %u",&i);
getch();
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Prepare me a program for the animation of train

2242


What are properties in oop?

839


what type of question are asked in thoughtworks pair programming round ?

1993


What is destructor give example?

838


any one please tell me the purpose of operator overloading

2192


What is the point of polymorphism?

807


Why is destructor used?

784


What is the purpose of polymorphism?

911


Get me an image implementation program.

1766


What is the main purpose of inheritance law?

972


What does sksksk mean in text slang?

1866


Can private class be inherited?

950


What is encapsulation in simple terms?

805


Give two or more real cenario of virtual function and vertual object

2107


What are oops functions?

808