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



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

Answer / 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

More OOPS Interview Questions

What is use of overloading?

0 Answers  


What are generic functions and generic classes?

5 Answers  


What is abstraction example?

0 Answers  


what is the difference between containership and inheritence?

1 Answers  


What is encapsulation selenium?

0 Answers  


tel me oops defination in single line

2 Answers  


What does and I oop mean in text?

0 Answers  


What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5

16 Answers   TCS,


What is abstract class in oops?

0 Answers  


There are 2 empty jars of 5 and 3 liters capacity. And a river is flowing besides. I want to measure 4 liters of wanter using these 2 jars. How do you do this?

2 Answers  


Program to check whether a word starts with a capital letter or not.

1 Answers   Infosys,


what are the characteristics of oops?

7 Answers   NIIT,


Categories