Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 747 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C] Simple Substitution Cipher - ROT1

#1

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Output:

Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Simple function I wrote to share. Enjoy
Reply

#2
Its sad none of your posts get any comments when they are pretty HQ. Keep it up!
Reply

#3
Too bad I don't know any C.
I should probably pick up a book and a project.
Reply

#4
str[0] is str

basically the brackets are just adding the number to the first pointer value..

like
str[0] is str+0
str[1] is str+1
str[2] is str+2
etc
Reply

#5
Yeh I'm not sure why you dereferenced str[0] and not just str.
Reply

#6
In the end it doesn't truthfully matter. I use &str[0] as preference for readability, since &str isn't the same as str in this context. With &str[0] I know it's a c-style string when I first look at the code and I can see that I'm pointing to the first char in the sequence before the null terminator, and not just some other type's value (implying a non-pointer), where str by itself, disregarding the variable name, may not be as obvious without looking back at the declaration or utilizing intellisense. I use a text editor to compile my C code, not any fancy IDE... The compiler output doesn't differentiate between &str[0] and str, so it would be the same as arguing what kind of naming convention is used... As long as there is consistency it doesn't matter. :smile:

You'd either have to have been given a compiler error/warning where the pointer is mis-used, or, you'd have to look at the declaration or where it's being used to see that it's a pointer if it is not obvious (unless hungarian notation was used).
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through