- Strength to Increase Rep
- +17
- Strength to Decrease Rep
- -4
- Upvotes Received
- 2K
- Posts with Upvotes
- 2K
- Upvoting Members
- 627
- Downvotes Received
- 169
- Posts with Downvotes
- 145
- Downvoting Members
- 113
Re: You don't set RAND_MAX, it's a constant value (usually 32767). I don't see why you would want to set it unless the range is too small for you (in which case you use a better random number generator). Tell us how you're trying to go about solving the problem, show … | |
Re: Create an array of questions and use the random number as an index for the array. | |
Re: >why? Because when you use void main, your code is no longer guaranteed to compile or run. The C standard specifies two definitions of main, and you should use one of those unless you have a [I]very[/I] good reason not to: [code=c] /* When expecting no command line arguments */ … | |
Re: >Its only drawback is that, while it mentions bogosort, it doesn't give an implementation. For two reasons. First, there's little point in providing an implementation of a sort that would never be used in practice. My site is about practical programming. Second, bogosort is a pain to verify for correctness. … | |
Re: [QUOTE]can you please tell me short and best answer so that i can understand it more clearly...[/QUOTE] Compilers are not required to support anything but the following two definitions of main (equivalent definitions are allowed though): [code] int main() { ... } [/code] [code] int main(int argc, char *argv[]) { … | |
Re: >wat is echo?? In this case, echo means that when you type a character, it prints to the screen so you can see what you typed. | |
Re: Ethical hacking is the practice of penetrating security (usually with the owner's consent) for the purpose of improving it rather than taking advantage of weaknesses for personal gain or malicious reasons. | |
Re: It looks like you're on the right track. Do you have a specific question? | |
Re: [quote] Bleach Naruto FMA Samurai Champloo Samurai 7 [highlight]Onegai Teacher Onegai Twins[/highlight] Hellsing Samurai X [/quote] That's a pretty sudden switch. Aren't both Onegai Teacher and Onegai Twins romantic comedies? | |
Re: >Is this possible in vb.net Of course. It's not like you're doing anything exceptionally complicated, but it [I]will[/I] be tedious. Kanji is symbolic and based on concepts/words while katakana is based on syllables. There's really not an algorithm for breaking kanji down into katakana, so you have to take all … | |
Re: >Below is my source code but I am getting errors stating invalid conversions. Post the errors. | |
Re: >But the more I seek for that the more I understand >how super impossible that is in this sad world... Then learn "great machine code programming" and be your own friend. Because with that attitude, your standards are too high for real friends. | |
Re: >What's the HARDEST program you've written? Operating system. Well, technically I didn't write it, but I did patch it into behaving and that consisted of replacing about 90% of the code. | |
Re: That seems kind of silly to me. The point of a checksum is to verify the legitimacy of a file after downloading it. If you're getting the checksum before downloading the file it's no different from taking on faith that the file is legit in the first place. | |
Re: Alternatively, use isprint to determine if there's a printable representation of the character, and show the numeric value if there is not. | |
Re: [QUOTE]I regard hielo's non-responsive response as an attempt to bully a newbie.[/QUOTE] I'm sorry you feel that way, but nothing in hielo's post constitutes bullying. Your use of code tags made the code more difficult to follow (for which he suggested a fix), and frowny faces embedded in the code … | |
Re: [QUOTE]all i could find, peaople saying: it depends on the os, compiler, etc[/QUOTE] When you rely on compiler-specific features, that's the correct answer. For textcolor(), the portable replacement (for Windows platforms) is [URL="http://msdn.microsoft.com/en-us/library/ms686047(v=vs.85).aspx"]SetConsoleTextAttribute()[/URL]. For delay() and sleep() the portable replacement (also for Windows) is [URL="http://msdn.microsoft.com/en-us/library/ms686298(VS.85).aspx"]Sleep()[/URL]. [QUOTE]Please write a proper answer, … | |
Re: I see several problems, but the most likely one you're encountering is this: [code] int bank::accno=0; [/code] accno doesn't exist in the class. The only static data member is called accnumber, so I can only assume the mixup is a brain fart. Make sure all identifiers match up and it … | |
Re: [QUOTE]What is meant by STEP-COUNT METHOD?[/QUOTE] You define what a "step" means for the algorithm (usually statements), then the total of those steps using variables such as N can be calculated. [QUOTE]What is the procedure in that to calculate?[/QUOTE] [list] [*]First define steps: [code=c] int mean(int a[], size_t n) { … | |
Re: >I'm not quite sure the difference between strcmp and == operator when comparing 2 different strings Presumably you're using C-style strings, otherwise strcmp wouldn't be an option. So with that in mind, you should use strcmp because it compares the contents of the strings while == compares the address of … | |
Re: You write your code in the text editor of your choice, then pass the text file to NASM for assembly. | |
Re: I'm impressed. You actually made it 5 posts before turning into a total d'bag. Most of your kind don't make it two posts, so I'd say you have some potential in being a normal, well adjusted member of society. With some effort, of course. | |
Re: [QUOTE]Simple example adding two numbers is[/QUOTE] Clearly you don't understand what the OP is asking. The problem is to add two numbers that cannot be stored in any integer type. It's an exercise in [URL="http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic"]arbitrary precision arithmetic[/URL]. | |
Re: >How to calculate time complexity of any algorithm or program .... The most common metric for calculating time complexity is Big O notation. This removes all constant factors so that the running time can be estimated in relation to N as N approaches infinity. In general you can think of … | |
Re: >You are relying upon that program (pause.exe) being available You're also relying on that program doing what you expect it to do. The problem is that one can easily replace pause.exe with another program of the same name but a malicious payload. [ICODE]system("pause");[/ICODE] isn't portable, but the real kicker is … | |
Re: What's the range of int? I bet not enough to handle that value, so on your system it wraps around and you find yourself with a negative value. | |
Re: [QUOTE=heroares;1699778]how can i write .[/QUOTE] The problem you've described is adequate as either the first or second program after hello world for absolute beginners, so if you don't know where to start, I'd say start by learning a little C++. | |
| Re: [B]>I can't find good source of knowledge about this algorithm.[/B] Unless by "good" you mean "full source code that I can understand at my newbie level and instructions on exactly how it works so that I can paste it into my homework and get away with it", I'd say you … |
Re: [QUOTE]So in the long run it will probably be better to read it into a vector[/QUOTE] When I give this as an interview problem, there's a caveat that the file may be very large. Whether I mention it after being asked about file sizes or by rejecting solutions similar to … | |