C/C++ Programming for Hackers: Part 3 (Examining the Code)

2 comments
Welcome back, fellow hackers! as promised, in Part 3, we will be examining the code we just compiled in part 2. this will be a short how-to, but hopefully it will give you an understanding of how C/C++ programs run.
so, let's get started!
  • #include <stdio.h> this line tells the compiler to include a library file, in this case, stdio.h. this file is built into the libraries of GCC and holds all the basic input/output instructions, like printf().
  • int main() this is the main function of the program. all programs have this function. from embedded systems to computergames and operating systems. it is always the first function that is called (called=used in technical terms) when a program runs, much like the main.c file is the first file that is called when a program runs.
  • the { and } these are called "brackets". in between these, we put our code to be executed by that function. in this case, it is only the main() function. the code in between 2 brackets is called a block of code.
  • printf("Hello Null Byte!\n"); this is the instruction that prints text on the screen. the parameters of an instruction (parameters are values that an instructions requires to run) are placed in between (). in this case, printf just needs a string to run (yes, a string REALLY is the correct name for a word/sentence in a program). in almost every programming language, the value of a string variable (i'll talk about variables in a later how-to) is placed in between quotation marks, or "". so why wasn't \n printed out on the screen? because \n is an instruction inside printf to tell the program to go to a new line. you can try to edit the main.c and remove the \n, recompile it and see for yourselves what it will do.
  • return 0; this line instructs the program to exit with code 0 (code 0 stands for "the program completed successfuly"). take note that main() is an integer (int) and needs to return a value after it finished. that is for what the "return" instruction is made. have you ever wondered what these error codes mean when a program crashes? well now you know. they are simply waypoints for developers to find where something went wrong in their program when the user encountered the bug.
also take note: all instructions end with a ;. this ; basically means "go to the next instruction." it is kind of a dot on the end of a sentence, but for a program.
that's it folks! in the next tutorial, i will talk about the differences between programming and scripting languages and their advantages/disadvantages, as there still seems to be confusion about this.
if you have any problems or questions, feel free to comment your question down below!
-Phoenix750
Next PostNewer Post Previous PostOlder Post Home

2 comments:

  1. This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:

    -Phone hacks (remotely)
    -Credit repair
    -Bitcoin recovery (any cryptocurrency)
    -Make money from home (USA only)
    -Social media hacks
    -Website hacks
    -Erase criminal records (USA & Canada only)
    -Grade change
    -funds recovery

    Email: onlineghosthacker247@ gmail .com

    ReplyDelete
  2. Do you need to increase your credit score?
    Do you intend to upgrade your school grade?
    Do you want to hack your cheating spouse Email, whatsapp, Facebook, instagram or any social network?
    Do you need any information concerning any database.
    Do you need to retrieve deleted files?
    Do you need to clear your criminal records or DMV?
    Do you want to remove any site or link from any blog?
    you should contact this hacker, he is reliable and good at the hack jobs..
    contact : cybergoldenhacker at gmail dot com

    ReplyDelete

Kategori

Kategori

MY BLOGGER. Powered by Blogger.

Recent Comments

Formulir Kontak

Name

Email *

Message *

Followers

Archives

love hacker triks

love hacker triks

Flickr

Featured Post

Popular