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 |
What will happen when the following code is run: int x; while(x<100) { cout<<x; x++; } 1) The computer will output "0123...99" 2) The computer will output "0123...100" 3) The output is undefined
what is data hiding.
What is purpose of inheritance?
what is namespace? what are the uses of namespace?
What is an example of genetic polymorphism?
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?
What is difference between oop and pop?
What is abstraction oop?
how does a main() in C++ is different from main() in C?
why c++ is called OOPS? waht is inherutance? what is compiler?
What does it mean when someone says I oop?
What is the significance of classes in oop?