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

How does polymorphism work?

0 Answers  


Pls...could any one tell me that whether we can access the public data memeber of a class from another class with in the same program. Awaiting for your response Thanku

4 Answers  


In which cases you use override and new base?

2 Answers  


1.what are two type of classe members called? 2.what is data hiding and data encapsulation? 3.how do you make a class member visible aouside its class? 4.what is the default visibility of a class data member? 5.what are the advantages of oop over the structured programing?

6 Answers  


c++ program to swap the objects of two different classes

0 Answers  






Precompilation ?

1 Answers   emc2,


Can an interface inherit a class?

0 Answers  


what are the disadvantages of C++?

25 Answers   ATS, Infosys, UNI, Wipro,


What is oops?what is its use in software engineering?

0 Answers  


can main method be overloaded...??? How..????

2 Answers   Satyam,


What is overloading and its types?

0 Answers  


WHAT IS THE ACTUAL DEFINATION OF OBJECT AND THE CLASS IN ONE SINGLE LINE WHICH THE INTERVIEWER WANT TO LISTEN.

11 Answers  


Categories