Jump to content

Programming interest unna vaallu itu randi!!!!!


Recommended Posts

Posted

[quote author=andhrabalayya link=topic=127624.msg1411184#msg1411184 date=1291162820]
Well, you generally can't copy an integer quantity into a variable that holds a pointer quantity. The types don't match. There are no language-defined rules for what happens when you play with pointers this way. It is up to the operating system and compiler(segmentation fault). The language only defines what happens when you code within the confines of the language's specifications.  This sort of thing is outside the bounds of the language specifications.
[/quote]
Ohh yaa..type match avvadhu correct ee..kani pointer kuda uninitialized ee kadhaa..i mean a pointer should point to some thing kadha baa..am i missing some thing here..

  • Replies 199
  • Created
  • Last Reply

Top Posters In This Topic

  • krldr871

    34

  • dkchinnari

    31

  • chipanjichiru

    27

  • andhrabalayya

    22

Posted

[img]http://www.imageping.com/out.php/i13461_Brahmifits.gif[/img]

Posted

[quote author=nastyguys link=topic=127624.msg1411202#msg1411202 date=1291163062]
[img]http://www.imageping.com/out.php/i13461_Brahmifits.gif[/img]
[/quote]
*7*^ *7*^ *7*^

Posted

[quote author=ChittiNaidu link=topic=127624.msg1411206#msg1411206 date=1291163139]
[img]http://i28.tinypic.com/ipcent.gif[/img]  same doubt
[/quote]

neeku programming raadu annav gaa  sCo_hmmthink sCo_hmmthink

Posted

[quote author=Leader871 link=topic=127624.msg1411200#msg1411200 date=1291163038]
Ohh yaa..type match avvadhu correct ee..kani pointer kuda uninitialized ee kadhaa..i mean a pointer should point to some thing kadha baa..am i missing some thing here..
[/quote]
[img]http://i28.tinypic.com/ipcent.gif[/img]
same dbt

Posted

Umm sorry chudaledu...
No, the * in that case does not mean 'dereference'.  it is a part of the type of the variable. So "a" itself is a pointer-to-int, and you're initializing it with the address 5.  The int that is at address 5 is at the moment unknown.
If you had done this:

int *a;
*a = 5;

then the first * is part of the data type, but the second is dereferencing.  In this case, "a" is an uninitialized pointer, and you are trying to set the int at some random address to 5. Distinct difference.

[quote author=Leader871 link=topic=127624.msg1411200#msg1411200 date=1291163038]
Ohh yaa..type match avvadhu correct ee..kani pointer kuda uninitialized ee kadhaa..i mean a pointer should point to some thing kadha baa..am i missing some thing here..
[/quote]

Posted

[quote author=ChittiNaidu link=topic=127624.msg1411221#msg1411221 date=1291163353]
programming raadu ante....mari oo tega kashtapadipoyi AMAV lo venky laga...ratrianta kurchoni code lu rayadam raadu..

normal vi aite mange setta... @3$% e[color=red]di ekkada pettalo..ekkada undalo telusu...[/color] sSc_hiding2
[/quote] LoL.1q LoL.1q LoL.1q

Posted

[quote author=andhrabalayya link=topic=127624.msg1411222#msg1411222 date=1291163362]
Umm sorry chudaledu...
No, the * in that case does not mean 'dereference'.  it is a part of the type of the variable. So "a" itself is a pointer-to-int, and you're initializing it with the address 5.  The int that is at address 5 is at the moment unknown.
If you had done this:

int *a;
*a = 5;

then the first * is part of the data type, but the second is dereferencing.  In this case, "a" is an uninitialized pointer, and you are trying to set the int at some random address to 5. Distinct difference.
[/quote]


printf("%d',*a) answer 5 aa baa

Posted

Ok one more interesting problem..

int a=5;

printf("%lld",*(long *)(&a));

printf("%ld",*(long *)(&a));

Posted

[quote author=ChittiNaidu link=topic=127624.msg1411236#msg1411236 date=1291163595]
  Katrina KAif Sonia Gandhi Role vestunte.....Parliament lo Sonia ni chusi Katrina ni oohinchukune face nuvvu nu....[img]http://s5.tinypic.com/30wsgpf_th.jpg[/img]

akkada seppindi PRogramming gurinchi....
[/quote]

ante ante  @3$% @3$%

Posted

[quote author=Leader871 link=topic=127624.msg1411200#msg1411200 date=1291163038]
Ohh yaa..type match avvadhu correct ee..kani pointer kuda uninitialized ee kadhaa..i mean a pointer should point to some thing kadha baa..am i missing some thing here..
[/quote]

Pointer should point to address of what u store. In int *p, int is not type of pointer. int is type of the number what we store at a address which is pointed by p.
Am i correct.

Ante p=&a; ani ichamanuko. a ane variable lo integer ni matrame store cheyagalam..  (Lonchem confusionga cheppanu.. sSc_hiding2 sSc_hiding2)

Posted

[quote author=ChittiNaidu link=topic=127624.msg1411221#msg1411221 date=1291163353]
programming raadu ante....mari oo tega kashtapadipoyi AMAV lo venky laga...ratrianta kurchoni code lu rayadam raadu..

normal vi aite mange setta... @3$% edi ekkada pettalo..ekkada undalo telusu... sSc_hiding2
[/quote]

@3$% @3$% @3$% neeku maa venky antha kuda raddha?  @3$% @3$% Nee job dheni gurinchi sitti?

Posted

[quote author=dkchinnari link=topic=127624.msg1411229#msg1411229 date=1291163473]

printf("%d',*a) answer 5 aa baa
[/quote]
kadu baa..
pointer anedi edoka address ki point cheyali..right now when u say int *p it is pointing to some random value..if it were some thing like..
int a=5,*p;

p = &a;
and then print *p u get a 5..

Posted

[quote author=TollywoodEmperor link=topic=127624.msg1411239#msg1411239 date=1291163651]
Pointer should point to address of what u store. In int *p, int is not type of pointer. int is type of the number what we store at a address which is pointed by p.
Am i correct.

Ante p=&a; ani ichamanuko. a ane variable lo integer ni matrame store cheyagalam..  (Lonchem confusionga cheppanu.. sSc_hiding2 sSc_hiding2)
[/quote]
nenu cheppindi ahde kadhaa [img]http://s5.tinypic.com/30wsgpf_th.jpg[/img]

Posted

[quote author=Leader871 link=topic=127624.msg1411251#msg1411251 date=1291163800]
kadu baa..
pointer anedi edoka address ki point cheyali..right now when u say int *p it is pointing to some random value..if it were some thing like..
int a=5,*p;

p = &a;
and then print *p u get a 5..
[/quote]

nu adiganadaniniki answer enti baa...

×
×
  • Create New...