Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #31.8K
~3K People Reached
Favorite Forums
Favorite Tags
c x 6

5 Posted Topics

Member Avatar for jmwalloh

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 …

Member Avatar for deceptikon
0
276
Member Avatar for Adrossii

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 = …

Member Avatar for sunktugg
0
309
Member Avatar for hiiiiii@

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 …

Member Avatar for sunktugg
0
228
Member Avatar for saurav_panda

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 …

Member Avatar for sunktugg
0
197
Member Avatar for harshchandra

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 >> …

Member Avatar for sunktugg
1
2K

The End.