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

What is overloading in oop?

765


What is overloading and its types?

828


What is static in oop?

834


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1896


explain sub-type and sub class? atleast u have differ it into 4 points?

2049


Can we define a class within the interface?

800


Please send ford technologies placement paper 2 my mail id

1849


What is encapsulation in oops?

770


What is a class in oop?

780


What is an advantage of polymorphism?

826


Why do while loop is used?

782


what is difference between class template and template class?

2408


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

1971


Write a program to reverse a string using recursive function?

2033


What is byval and byref? What are differences between them?

1959