The main function

On May 12, 2009, in linux, linux articles, linux programming, by mahesh
0


The main function is the first program that gets executed when the program starts, what else is so important about this? good, there are some more to learn about this main function lets start.

the prototype
int main()
or
int main(int argc, char *argv[])
or
int main(int argc, char **argv)
or
int main(int argc, char **argv, char *env[])
or
int main(int argc, char **argv, char **env)

Note: char ** and char *[] are the same
Is the last two prototypes valid? yes, it is valid. We will discuss later

(more…)

Share
Tagged with:
 

gdb – disassemble program

On April 28, 2009, in linux, linux programming, linux tips, by mahesh
0


Sometimes while working on some issue, it might require to view

the disassembled code, gdb has a command that does the job for you.

The disassemble command, screen shot of the command is shown below,

Hello world source

Hello world source

Above is the code, that we use for our work

Compiling helloworld

Compiling helloworld

(more…)

Share
Tagged with:
 



From any were in the function to jump to the bigining of the function press [[

similarly to the end of the function use ]]

Share
Tagged with: