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 oops with example?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
How do you achieve runtime polymorphism?
How do you use inheritance in unity?
How do you explain polymorphism?
What is oops and why we use oops?
2. Give the different notations for the class.\
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is encapsulation and abstraction? How are they implemented in C++?
can we make game by using c
What are the three parts of a simple empty class?
Prepare me a program for the animation of train
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
write a programe to calculate the simple intrest and compund intrest using by function overlading
What is purpose of inheritance?