Huge pointer in C program Question with Answers
Q1.What will be output ?
void main()
{
int huge *a=(int huge *)0x59990005;
int huge *b=(int huge *)0x59980015;
if(a==b)
printf("power of pointer");
else
printf("power of c");
getch();
}
Output: power of pointer
Explanation:
Here we are performing relational operation between two huge address.
So first both a and b will normalize.
a=(0x5999)* (0x10)+(0x0005)=0x9990+0x0005=0x9995
b=(0x5998)* (0x10)+(0x0015)=0x9980+0x0015=0x9995
Here both huge address is representing same physical address. So a==b is true.
Blog List
-
The Vera Zvonareva Picture
-
*Vera Zvonareva*
NEW YORK CITY, NEW YORK
*V. ZVONAREVA/K. Kanepi6-3, 7-5*
THE MODERATOR: Questions, please.
*Q. Crazy, crazy kind of weather out...
13 years ago
-
Cricketers and Bizarre nicknames
-
*Cricketers are known for the innovative strokes they execute; the
different ways they work out to outwit batsmen and not forgetting the
captains who spe...
13 years ago
-
Deepika Padukone in Dum Maro Dum
-
Baffling wasn't it? So was it for Deepika Padukone. The actress was
recently offered Rs. 4 crores by a wealthy NRI family in London to perform
the four m...
13 years ago
-
C programming Language Technical Interview Questions and Answers
-
Predict the output or error(s) for the following:
*8. # include*
*aaa() {
printf("hi"); }bbb(){ printf("hello"); }ccc(){ printf("TechPrepa...
13 years ago
-
Happy new year SMS
-
*H *ours of happy times with friends and family
*A *bundant time for relaxation
*P *rosperity
*P *lenty of love when you need it the most
*Y *outhful excitem...
13 years ago
-
Placement Questions With Solution of C/C++ Programming
-
Technical Placement C++ Question with Solution CLICK HERE FOR MORE...
1. void main()
{
int a, *pa, &ra;
pa = &a;
ra = a;
cout <<"a="<
c++ placement interv...
13 years ago
-
Aaj Kuchh Maangtee Hoon Priya - Manoshi Chatterjee
-
आज कुछ माँगती हूँ प्रिय
आज कुछ माँगती हूँ मैं
प्रिय क्या दे सकोगे तुम?
मौन का मौन में प्रत्युत्तर
अनछुये छुअन का अहसास
देर तक चुप्पी को बाँध कर
खेलो अपने ...
15 years ago
-
No comments:
Post a Comment