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
What is overloading in oop?
What is overloading and its types?
What is static in oop?
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?
explain sub-type and sub class? atleast u have differ it into 4 points?
Can we define a class within the interface?
Please send ford technologies placement paper 2 my mail id
What is encapsulation in oops?
What is a class in oop?
What is an advantage of polymorphism?
Why do while loop is used?
what is difference between class template and template class?
what type of question are asked in thoughtworks pair programming round ?
Write a program to reverse a string using recursive function?
What is byval and byref? What are differences between them?