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


Please Help Members By Posting Answers For Below Questions

why reinterpret cast is considered dangerous?

1894


• What are the desirable attributes for memory managment?

1720


What is polymorphism oop?

612


what is difference between class template and template class?

2152


State what is encapsulation and friend function?

689






What is the benefit of oop?

566


What is the fundamental idea of oop?

629


what type of questions

1688


Hi friends I have experience of 6 months in website design and maintanence. Now i am looking for other IT jobs.. to switch platform. please post any interview you know in chennai.

1776


Describe these concepts: Polymorphism, Inheritance and Abstraction.

604


What does and I oop and sksksk mean?

644


can inline function declare in private part of class?

3651


What is persistence in oop?

658


What are the benefits of interface?

571


String = "C++ is an object oriented programming language.An imp feature of oops is classes and objects".Write a pgm to count the repeated words from this scenario?

1932