Which language to use

Hi ppl,

I am coding a program and in that i have to handle a very large amount of data. It can vary from 1 to 1000000000. I am using "C" and "unsigned long int" data type, but my program hangs every time i try to run it over 1000000. Any suggestions???

Replies

  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Why don't you try C#.NET 2008 and use BLOB format?
  • Pensu
    Pensu
    @praveenscience: will try that...thnks..๐Ÿ˜€
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    I said C# because, it is kind of Platform Independent. Mono for Linux and Mac... ๐Ÿ˜€ And you can use your own C / C++ Codes to work on it... ๐Ÿ˜€ And, BTW, what is the logic you are trying to implement? I mean, I didn't understand your problem... ๐Ÿ˜”
  • Pensu
    Pensu
    Basically i have been given a task to find out primes in the range of 1 to 1000000000. So i made the code but my program hangs as soon as i input data greater than 1000000. So i thought may be its the problem with data type.
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Yeah, first of all data type should be some kinda looong integer... and secondly, C doesn't have that much memory to handle the data... ๐Ÿ˜”
  • Pensu
    Pensu
    Yeah.....its looks like that. And can you please elaborate the part with memory. Whats this memory restriction???
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Dude, C Applications are 16 bit apps, which cannot handle more than 16bit of instruction and data... Whereas C# is a 32 bit application and it can handle much higher data... ๐Ÿ˜€ Got it?
  • Pensu
    Pensu
    Hmm......thanks...๐Ÿ˜€
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    You are welcome... ๐Ÿ˜€
  • rubensg
    rubensg
    Well, you can pretty much do the same function on C just with a different approach. If you machine has multiple cores, you can program in threads so that you make them run on different processing units concurrently. I think that would be enough to handle the amount of data you are going to feed it.

    In case that would not be enough, C# would be there to do it for you.
  • PraveenKumar Purushothaman
    PraveenKumar Purushothaman
    Actually, that doesn't work in C. Since, DOS works only in a single thread model, C too does the same! ๐Ÿ˜”

You are reading an archived discussion.

Related Posts

Hint : They are in news recently.......๐Ÿ˜
We live in the world of tough competition and peer pressure is natural outcome of the competition we build up in our own minds. This competition may lead to positive...
i am having trouble finding the oxidation state of some compounds namely Ni(CO)4 & Na3Fe(CN)5NO please help
plz help me in my final year project is handover in 3G simulation using matalb ๐Ÿ˜”๐Ÿ˜”๐Ÿ˜”๐Ÿ˜”
Hi, im gautam, a computer science engineer from visakhapatnam, currently working in UAE as an automation engineer working with PLCs. Iam crazy about technology and engineering that has brought me...