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 for loop and its syntax?
What is polymorphism and why is it important?
What is class and example?
if i have same function with same number of argument but defined in different files. Now i am adding these two files in a third file and calling this function . which will get called and wht decide the precedence?
What makes a language oop?
What type of loop is a for loop?
What is class in oop with example?
what is difference between class template and template class?
write knight tour problem which is present in datastructure
Why is polymorphism important in oop?
Explain the advantages of inheritance.
What is property in oops?
Why is abstraction needed?
What is polymorphism what is it for and how is it used?
What is abstraction in oop with example?