SUNDAY CLASS

1 view
Skip to first unread message

swadhin jaiswal

unread,
Nov 12, 2011, 4:21:34 AM11/12/11
to bbswork...@googlegroups.com
Today,Class was not possible..but there is class on sunday..plz send the topics u have left so that we can manage the class properly...reply on this thread only....

alka maurya

unread,
Nov 12, 2011, 11:28:27 AM11/12/11
to bbswork...@googlegroups.com
ok  but plz sir timming should be at morning  as 8 o clock or 9 o clock
And topic is system stack, and queue

alka maurya

unread,
Nov 12, 2011, 11:58:35 AM11/12/11
to bbswork...@googlegroups.com
PLZ SIR ,KINDLY  INFORM THERE WOULD BE CLASS 2MARO R NT B4 D CLASS WILL B HELD ON

alka maurya

unread,
Nov 12, 2011, 12:46:54 PM11/12/11
to bbswork...@googlegroups.com
explain this
#include<stdio.h>
int 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");
return 0;

 

2
#include<stdio.h>
int main(){
   char far *p =(char far *)0x55550005;
   char far *q =(char far *)0x53332225;
   *p = 80;
   (*p)++;
   printf("%d",*q);
   return 0;
}

alka maurya

unread,
Nov 12, 2011, 1:28:41 PM11/12/11
to bbswork...@googlegroups.com
output
#include<stdio.h>
#include<string.h>
int main(){
int register a;
scanf("%d",&a);
printf("%d",a);
return 0;

swadhin jaiswal

unread,
Nov 12, 2011, 1:42:19 PM11/12/11
to bbswork...@googlegroups.com
Whenever there is REGISTER variable..it is stored in register and used by program regularly...so register variables have not got address in memory..so when we use &a(address of a)...this is an error.....hope u got..

swadhin jaiswal

unread,
Nov 12, 2011, 1:44:51 PM11/12/11
to bbswork...@googlegroups.com
Timing of tomorrow class will be 10.30...if anybody has any problem..plz let us knw...gn

arvind singh

unread,
Nov 12, 2011, 3:01:27 PM11/12/11
to bbswork...@googlegroups.com
Explanation:

The pointer which can point or access whole the residence memory of RAM i.e. which can access all the 16 segments is known as huge pointer

Size of huge pointer is 4 byte or 32 bit.

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.

Turbo C compiler is based on 8085 microprocessor in which physical address of memory is represented in 20 bit. Conversion of 4 byte or 32 bit huge address into 20 bit actual physical address is known as normalization.

PHYSICAL ADDRESS=(SEGMENT ADDRESS)*16+OFFSET ADDRESS          (IN DECIMAL)

PHYSICAL ADDRESS=(SEGMENT ADDRESS)*0X10+OFFSET ADDRESS   (IN HEXADECIMAL)

I HOPE THAT  I GIVE A  SUFFICIENT EXPLANATION FOR THIS QUESTION.

Alka Maurya

unread,
Nov 12, 2011, 10:56:53 PM11/12/11
to BBSworkshop2011
i got it thax sir

On Nov 12, 10:42 am, swadhin jaiswal <jaiswal.swadh...@gmail.com>
wrote:
> Whenever there is REGISTER variable..it is stored in register and used by
> program regularly...so register variables have not got address in
> memory..so when we use &a(address of a)...this is an error.....hope u got..
> On Sat, Nov 12, 2011 at 11:58 PM, alka maurya <alka.maur...@gmail.com>wrote:
>
>
>
> > output
> > #include<stdio.h>
> > #include<string.h>
> > int main(){
> > int register a;
> > scanf("%d",&a);
> > printf("%d",a);
> > return 0;
>
> > On Sat, Nov 12, 2011 at 9:46 AM, alka maurya <alka.maur...@gmail.com>wrote:
>
> >> explain this
> >> #include<stdio.h>
> >> int 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");
> >> return 0;
>
> >> 2
> >>  #include<stdio.h>
> >> int main(){
> >>    char far *p =(char far *)0x55550005;
> >>    char far *q =(char far *)0x53332225;
> >>    *p = 80;
> >>    (*p)++;
> >>    printf("%d",*q);
> >>    return 0;
> >> }
>
> >>   On Sat, Nov 12, 2011 at 8:58 AM, alka maurya <alka.maur...@gmail.com>wrote:
>
> >>> PLZ SIR ,KINDLY  INFORM THERE WOULD BE CLASS 2MARO R NT B4 D CLASS WILL
> >>> B HELD ON
>
> >>> On Sat, Nov 12, 2011 at 8:28 AM, alka maurya <alka.maur...@gmail.com>wrote:
>
> >>>> ok  but plz sir timming should be at morning  as 8 o clock or 9 o clock
> >>>> And topic is system stack, and queue
> >>>>   On Sat, Nov 12, 2011 at 1:21 AM, swadhin jaiswal <
> >>>> jaiswal.swadh...@gmail.com> wrote:
>
> >>>>> Today,Class was not possible..but there is class on sunday..plz send
> >>>>> the topics u have left so that we can manage the class properly...reply on
> >>>>> this thread only....- Hide quoted text -
>
> - Show quoted text -

swadhin jaiswal

unread,
Nov 12, 2011, 11:08:58 PM11/12/11
to bbswork...@googlegroups.com
the huge ,far,near all these pointer only exists in turbo c...u wil never find this type of questions in gate or any exams...btw nice effort ARVIND...

Alka Maurya

unread,
Nov 13, 2011, 9:24:49 PM11/13/11
to BBSworkshop2011
ok sir


On Nov 12, 8:08 pm, swadhin jaiswal <jaiswal.swadh...@gmail.com>
wrote:
> > > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages