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 |
can main method be overloaded...??? How..????
what is the function of 'this' operator ?
what is code for call by value and call by reference?
What is virtual function?where and when is it used?
Can destructor be overloaded?
What is the default size allocated for array in the statement if size not specified " int a[] "
different types of castings
What is property in oops?
what is the difference between inter class and abstract class...?
Can java compiler skips any statement during compilation time?
what is the sylabus for priliminaries?
class CTest { public: void someMethod() { int nCount = 0; cout << "This is some method --> " << nCount; } }; int main() { CTest *pctest; pctest->someMethod(); return 0; } It will executes the someMethod() and displays the value too. how is it possible with our creating memory for the class . i think iam not creating object for the class. Thanks in Advance... Prakash