Jump to content

C Language experts!!!!!


Recommended Posts

Posted

[quote author=Leader871 link=topic=118537.msg1285209#msg1285209 date=1289352797]
ippudu inkoti..10th byte lo 0 value set chestunnaa..deentlo issue ento cheppandi..


uint64_t a[5];
memset(a+10,0,1);
[/quote]

Type casting problem aa  sCo_hmmthink sCo_hmmthink

  • Replies 64
  • Created
  • Last Reply

Top Posters In This Topic

  • krldr871

    20

  • andhrabalayya

    19

  • 150bryant

    5

  • bhrami

    4

Popular Days

Top Posters In This Topic

Posted

[quote author=andhrabalayya link=topic=118537.msg1285257#msg1285257 date=1289353218]
lol  LoL.1q daniki kuda google search aah
[/quote]

Aithe OK  sHa_high5ing sHa_high5ing

Posted

[quote author=psycopk link=topic=118537.msg1285239#msg1285239 date=1289353108]
using c++ folder lo unna file names with given extension ani retriev cheyali...
rai sample program..
[/quote]
sCo_hmmthink sCo_hmmthink sCo_hmmthink current folder lo naa..ok ill try

Posted

[quote author=Nalla_Balu link=topic=118537.msg1285267#msg1285267 date=1289353286]
Type casting problem aa  sCo_hmmthink sCo_hmmthink
[/quote]
@gr33d @gr33d @gr33d
pointer addition chesetappudu i should typcast to char *
it should be

memset((char*)a + 10,0,1);
otherwise a + 10*8 lo set chestadi value

Posted

[quote author=Leader871 link=topic=118537.msg1285275#msg1285275 date=1289353360]
sCo_hmmthink sCo_hmmthink sCo_hmmthink current folder lo naa..ok ill try
[/quote]

i will give you the folder path and the file extension i am looking for

Posted

[quote author=Pranav link=topic=118537.msg1285248#msg1285248 date=1289353150]
@gr33d @gr33d
[/quote]
nenu beginner  sAni_monkey sAni_monkey sAni_monkey

Posted

memset passes it a pointer to the item at index 10 in the array, which is of course beyond the bounds of the array...So it writes one zero byte at some point beyond the array bounds!!
[quote author=Leader871 link=topic=118537.msg1285209#msg1285209 date=1289352797]
ippudu inkoti..10th byte lo 0 value set chestunnaa..deentlo issue ento cheppandi..


uint64_t a[5];
memset(a+10,0,1);
[/quote]

Posted

[quote author=ChittiNaidu link=topic=118537.msg1285063#msg1285063 date=1289351721]
Lab lo unna floating IPs anni grab cheyali.......ela...

Note: 50 machines unnnai.....vatiki IP changes every 30min...

so change aina prati sari...nenu grab chesi...save cheyali....[img]http://www.imageping.com/out.php/i15055_howaaahow.gif[/img]

Batch Script try chesa..but raledu... sCo_hmmthink

C lo emaina possibilit unda..
[/quote]

Check this link  ...[url=http://www.devasp.net/net/articles/display/686.html]http://www.devasp.net/net/articles/display/686.html[/url]

Correct Ayyithe Teesuko ...[img width=305 height=250]http://www.gifsoup.com/view2/1175787/anr-o.gif[/img]
Leka pothe nannu  sSc_hiding2 sSc_hiding2

Posted

#include<stdio.h>
int main(){
    int num,a=5;
    num=-a--;
    printf("%d  %d",num,a);
}

Posted

-5 4
[quote author=Leader871 link=topic=118537.msg1285329#msg1285329 date=1289353843]
#include<stdio.h>
int main(){
    int num,a=5;
    num=-a--;
    printf("%d  %d",num,a);
}
[/quote]

Posted

[quote author=andhrabalayya link=topic=118537.msg1285356#msg1285356 date=1289354060]
-5 4
[/quote]
edo sollu blog dorikindi baa..ee pilla ques ee unayi akkada.. @3$% @3$% aa pointer addition okati matram na ques  sSc_hiding2 sSc_hiding2

Posted

That would probably tell the compiler to interpret a has a buffer of characters, and then go to the 10th character to start.  That is probably within the space the array describes.Each element of that array is 8 bytes wide.Assuming a character is one byte wide, then you'd be starting from byte 0 within uint_64 1 in that array.
Anyway the way you solved it -> That writes a value within the bounds of the array, so it's less shady...

[quote author=Leader871 link=topic=118537.msg1285286#msg1285286 date=1289353436]
@gr33d @gr33d @gr33d
pointer addition chesetappudu i should typcast to char *
it should be

memset((char*)a + 10,0,1);
otherwise a + 10*8 lo set chestadi value
[/quote]

Posted

mama naaku chala interest programming antey..
kaani maku oka subject undedhi Numerical Methods through C ani..
adhi cheyyaleka sachi..C meedha virakthi vachi vadilesa...
MATLAB nerchaa...kani nenu mechie...so only konchamey panikosthundi...as of now.

Posted

sCo_hmmthink

[quote author=Leader871 link=topic=118537.msg1285369#msg1285369 date=1289354152]
edo sollu blog dorikindi baa..ee pilla ques ee unayi akkada.. @3$% @3$% [b]aa pointer addition okati matram na ques[/b]  sSc_hiding2 sSc_hiding2
[/quote]

Posted

Lol nuvu kuda JNTU badhitudiva... kani aaa rojulo numerical methods in C program rakudadu lab exam lo ani korukune vallam... ipudu lite anuko ( lab exams levu + google search )
MATLAB is not programming language kada.. MATLAB is Fun
[quote author=jamajacha link=topic=118537.msg1285401#msg1285401 date=1289354334]
mama naaku chala interest programming antey..
kaani maku oka subject undedhi Numerical Methods through C ani..
adhi cheyyaleka sachi..C meedha virakthi vachi vadilesa...
MATLAB nerchaa...kani nenu mechie...so only konchamey panikosthundi...as of now.
[/quote]

×
×
  • Create New...