- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
5 Posted Topics
Re: I must admit I do not know the rules by heart, but it seems quite backwards not to be able to discuss this. Understanding how buffer overflows attacks are implemented is key to understanding how to prevent them. An understanding of this topic is fundamental for any c programmer wanting … | |
Re: Is it possible he means an array with a size not known at compile-time? If so, one typically uses malloc() or similar. See following snippet: #include <stdint.h> #include <stdlib.h> void main() { // this can be set at run time // for example by the user size_t n, size = … | |
Re: Your question is a little bit too vague to understand. This snippet will read an arbitrary number of characters from the user (without feedback) and store them in memory. It will then proceed to print the numerical representation of these characters back to the screen. These numbers correspond to each … | |
Re: This is how I would go about it. Shortest word version: #include <stdio.h> void main() { char str[100], *ptr = str, *p_word = str, *p_best = str; unsigned count = 0, count_best = sizeof(str); // Fetch input printf("\nEnter the string: "); gets(str); do { // !(value & ~32) will match … | |
Re: Wait, what? No! Really not trying to be rude here, but this code gives "ineffective" a whole new meaning and it's listed to high on google not to include a post with the proper way of doing this. // Convert binary to gray-code unsigned bin2gray(unsigned bits) { return (bits >> … |
The End.